Browse Source

changed output of avatar so that the image is now a png and not a webp

tags/v1.7.0
Roxie Gibson 6 years ago
parent
commit
defdd35b53
2 changed files with 4 additions and 3 deletions
  1. +1
    -0
      README.md
  2. +3
    -3
      Roxbot/cogs/util.py

+ 1
- 0
README.md View File

@@ -19,6 +19,7 @@ _Coming Soon_
###### New Features
- NSFW commands now have the same system of preventing dupe outputs
###### Minor Changes
- `avatar` now outputs a png if the image is static.
- Moved NSFW commands to use aiohttp instead of requests which hopefully will wield quicker response times.
- Minor refactoring in places, which involves some directory movement.
###### Bug Fixes

+ 3
- 3
Roxbot/cogs/util.py View File

@@ -25,11 +25,11 @@ class Util():
if not user:
user = ctx.author

url = user.avatar_url
url = user.avatar_url_as(static_format="png")
if url.split(".")[-1] == "gif":
avaimg = 'avaimg.gif'
avaimg = '{0.name}.gif'.format(user)
else:
avaimg = 'avaimg.webp'
avaimg = '{0.name}.png'.format(user)

async with aiohttp.ClientSession() as session:
async with session.get(url) as img:

Loading…
Cancel
Save