From 2aa169d45bba9c0ec91aa3082794111755339e53 Mon Sep 17 00:00:00 2001 From: Zac Herd Date: Sat, 27 Jan 2018 12:00:45 +0000 Subject: [PATCH] v1.0.8 fixed avatar responses --- admincommands.py | 6 +++--- common.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/admincommands.py b/admincommands.py index 43aede5..f007f07 100644 --- a/admincommands.py +++ b/admincommands.py @@ -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: diff --git a/common.py b/common.py index af357fd..13f607f 100755 --- a/common.py +++ b/common.py @@ -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