Sfoglia il codice sorgente

v1.0.8 fixed avatar responses

master
Zac Herd 6 anni fa
parent
commit
2aa169d45b
2 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. +3
    -3
      admincommands.py
  2. +1
    -1
      common.py

+ 3
- 3
admincommands.py Vedi File

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


+ 1
- 1
common.py Vedi File

@@ -13,7 +13,7 @@ import json


# bot version
version = "v1.0.7"
version = "v1.0.8"


# TODO: generate this on the fly and make it look acceptable


Loading…
Annulla
Salva