aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamit <[email protected]>2015-09-02 23:07:36 +0100
committermegamit <[email protected]>2015-09-02 23:07:36 +0100
commit6a40a5da2ebc978e504625fff1d6befda906649f (patch)
treec2524b8e2cebad2d4eef062a8e80e4806d528636
parentDocument exceptions and change conf.py version detection. (diff)
downloaddiscord.py-6a40a5da2ebc978e504625fff1d6befda906649f.tar.xz
discord.py-6a40a5da2ebc978e504625fff1d6befda906649f.zip
Fix issue with author changing type
When cycling through the attributes of the data json 'author' within 'message' which was previously a user object is overwritten with a dictionary. This causes an AttributeError to be thrown ( and silently swallowed... thanks except: pass) whenever any of its attributes are referenced in the form message.author.x. User data should change in this step and the user object should not be modified for any reason so its safe to skip updating it.
-rw-r--r--discord/client.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/client.py b/discord/client.py
index 7d9812e6..89aacc09 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -244,7 +244,7 @@ class Client(object):
message = copy.deepcopy(older_message)
# update the new update
for attr in data:
- if attr == 'channel_id':
+ if attr == 'channel_id' or attr == 'author':
continue
value = data[attr]
if 'time' in attr: