aboutsummaryrefslogtreecommitdiff
path: root/discord/client.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2015-11-30 03:31:03 -0500
committerRapptz <[email protected]>2015-11-30 03:31:47 -0500
commit307392ff19c5e0a5bddfc67af010d4df52e24db8 (patch)
tree5f0769f684afb91fee34d2d38d6c0c5c7a86ea9e /discord/client.py
parentMiscellaneous documentation fixes. (diff)
downloaddiscord.py-307392ff19c5e0a5bddfc67af010d4df52e24db8.tar.xz
discord.py-307392ff19c5e0a5bddfc67af010d4df52e24db8.zip
on_status event now has the old game ID and old status as parameters.
Diffstat (limited to 'discord/client.py')
-rw-r--r--discord/client.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/discord/client.py b/discord/client.py
index cac3ee0d..401e4a35 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -206,13 +206,15 @@ class ConnectionState(object):
member_id = user['id']
member = utils.find(lambda m: m.id == member_id, server.members)
if member is not None:
+ old_status = copy.copy(member.status)
+ old_game_id = copy.copy(member.game_id)
member.status = data.get('status')
member.game_id = data.get('game_id')
member.name = user.get('username', member.name)
member.avatar = user.get('avatar', member.avatar)
# call the event now
- self.dispatch('status', member)
+ self.dispatch('status', member, old_game_id, old_status)
self.dispatch('member_update', member)
def handle_user_update(self, data):