Change reaction events signature and name.

This changes the event signature to be (reaction, user) instead of
(message, reaction, user) since the reaction data class already has
the message being reacted to as a member.

The name was shortened from on_message_reaction_ to on_reaction_ since
the message prefix was deemed redundant.
This commit is contained in:
Rapptz
2016-11-03 20:03:36 -04:00
parent 4d87b2f817
commit 12a3403af3
2 changed files with 19 additions and 7 deletions

View File

@ -272,7 +272,7 @@ class ConnectionState:
channel = self.get_channel(data['channel_id'])
member = self._get_member(channel, data['user_id'])
self.dispatch('message_reaction_add', message, reaction, member)
self.dispatch('reaction_add', reaction, member)
def parse_message_reaction_remove(self, data):
message = self._get_message(data['message_id'])
@ -291,7 +291,7 @@ class ConnectionState:
channel = self.get_channel(data['channel_id'])
member = self._get_member(channel, data['user_id'])
self.dispatch('message_reaction_remove', message, reaction, member)
self.dispatch('reaction_remove', reaction, member)
def parse_presence_update(self, data):
server = self._get_server(data.get('guild_id'))