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

**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. **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 ## v2.0.0
### Stuff Here about big changes and release
- More better open source stuff - pls pr me - More better open source stuff - pls pr me
- easy setup and get that wiki going - easy setup and get that wiki going


### Big Changes


### Regular Updates ### Regular Updates
#### New Features #### New Features
- Roxbot will remove all redundant settings (removed roles from self assign, etc.) - 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. - 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 #### Bug Fixes
- `deepfry` command now works all the time - `deepfry` command now works all the time
- Pride filter filenames fixed - Pride filter filenames fixed
- As many spelling mistakes as possible - 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. - 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. - Fixed bug where nowplaying embeds would have the wrong queued_by value.
- NSFW commands fixed


## v1.8.0 ## v1.8.0
#### New Features #### New Features

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

async def gelbooru_clone(self, ctx, base_url, post_url, tags): async def gelbooru_clone(self, ctx, base_url, post_url, tags):
limit = 150 limit = 150
tags = tags + tag_blacklist(ctx.guild) 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) posts = await roxbot.http.api_request(url)



+ 2
- 1
roxbot/http.py View File

async with aiohttp.ClientSession() as session: async with aiohttp.ClientSession() as session:
async with session.get(url, headers=headers, **kwargs) as resp: async with session.get(url, headers=headers, **kwargs) as resp:
try: try:
return await resp.json()
output = await resp.text()
return json.loads(output)
except json.JSONDecodeError: except json.JSONDecodeError:
return None return None



Loading…
Cancel
Save