Browse Source

fixed nsfw commands and improved randomness.

tags/v2.0.0
Roxie Gibson 5 years ago
parent
commit
e7b39b6689
3 changed files with 13 additions and 3 deletions
  1. +9
    -1
      CHANGELOG.md
  2. +2
    -1
      roxbot/cogs/nsfw.py
  3. +2
    -1
      roxbot/http.py

+ 9
- 1
CHANGELOG.md View File

@@ -1,20 +1,28 @@
**WARNING** It is not recommended to use any release before v2.0.0. All previous versions are logged and released as pre-releases and are only here as a historical record for myself. All post-v2.0.0 releases are finished products that are stable.

## v2.0.0
### Stuff Here about big changes and release
- More better open source stuff - pls pr me
- easy setup and get that wiki going

### Big Changes


### Regular Updates
#### New Features
- Roxbot will remove all redundant settings (removed roles from self assign, etc.)
- Cogs have a message if they fail to load. This is better than the entire program breaking.

#### Minor Changes
- NSFW commands should have even less chance of dupes.
- All time formatting is now standardised.

#### Bug Fixes
- `deepfry` command now works all the time
- Pride filter filenames fixed
- As many spelling mistakes as possible
- If player can't find a thumbnail for the now playing embed, it will just not have one; Instead of breaking.
- Fixed bug where nowplaying embeds would have the wrong queued_by value.
- NSFW commands fixed

## v1.8.0
#### New Features

+ 2
- 1
roxbot/cogs/nsfw.py View File

@@ -51,7 +51,8 @@ class NFSW():
async def gelbooru_clone(self, ctx, base_url, post_url, tags):
limit = 150
tags = tags + tag_blacklist(ctx.guild)
url = base_url + tags + '&limit=' + str(limit)
page = random.randrange(20)
url = base_url + tags + '&limit=' + str(limit) + '%pid=' + str(page)

posts = await roxbot.http.api_request(url)


+ 2
- 1
roxbot/http.py View File

@@ -65,7 +65,8 @@ async def api_request(url, *, headers=None, **kwargs):
async with aiohttp.ClientSession() as session:
async with session.get(url, headers=headers, **kwargs) as resp:
try:
return await resp.json()
output = await resp.text()
return json.loads(output)
except json.JSONDecodeError:
return None


Loading…
Cancel
Save