1
0
mirror of https://github.com/MrDetonia/Maki.git synced 2024-11-22 11:54:16 -05:00

v1.0.8 fixed avatar responses

This commit is contained in:
Zac Herd 2018-01-27 12:00:45 +00:00
parent b47a5190e3
commit 2aa169d45b
2 changed files with 4 additions and 4 deletions

View File

@ -50,11 +50,11 @@ def cmd_avatar(client, msg):
url = msg.content[8:] url = msg.content[8:]
response = "Avatar updated!" response = "Avatar updated!"
try: try:
response = urllib.request.urlopen(url) httpresponse = urllib.request.urlopen(url)
imgdata = response.read() imgdata = httpresponse.read()
yield from client.edit_profile(avatar=imgdata) yield from client.edit_profile(avatar=imgdata)
except urllib.error.URLError as e: except urllib.error.URLError as e:
response = "URL Error: " + e response = "URL Error: " + str(e)
except discord.HTTPException: except discord.HTTPException:
response = "Dicsord failed to edit my profile!" response = "Dicsord failed to edit my profile!"
except discord.InvalidArgument: except discord.InvalidArgument:

View File

@ -13,7 +13,7 @@ import json
# bot version # bot version
version = "v1.0.7" version = "v1.0.8"
# TODO: generate this on the fly and make it look acceptable # TODO: generate this on the fly and make it look acceptable