diff --git a/discord/partial_emoji.py b/discord/partial_emoji.py index 6819d649c..1089815eb 100644 --- a/discord/partial_emoji.py +++ b/discord/partial_emoji.py @@ -88,8 +88,8 @@ class PartialEmoji(_EmojiTag): return o @classmethod - def with_state(cls, state, *, animated, name, id=None): - self = cls(animated=animated, name=name, id=id) + def with_state(cls, state, *, name, animated=False, id=None): + self = cls(name=name, animated=animated, id=id) self._state = state return self diff --git a/discord/state.py b/discord/state.py index 07282bd79..fcfed7d94 100644 --- a/discord/state.py +++ b/discord/state.py @@ -466,7 +466,7 @@ class ConnectionState: def parse_message_reaction_add(self, data): emoji = data['emoji'] emoji_id = utils._get_as_snowflake(emoji, 'id') - emoji = PartialEmoji.with_state(self, animated=emoji.get('animated', False), id=emoji_id, name=emoji['name']) + emoji = PartialEmoji.with_state(self, id=emoji_id, animated=emoji.get('animated', False), name=emoji['name']) raw = RawReactionActionEvent(data, emoji, 'REACTION_ADD') member_data = data.get('member') @@ -500,7 +500,7 @@ class ConnectionState: def parse_message_reaction_remove(self, data): emoji = data['emoji'] emoji_id = utils._get_as_snowflake(emoji, 'id') - emoji = PartialEmoji.with_state(self, animated=emoji.get('animated', False), id=emoji_id, name=emoji['name']) + emoji = PartialEmoji.with_state(self, id=emoji_id, name=emoji['name']) raw = RawReactionActionEvent(data, emoji, 'REACTION_REMOVE') self.dispatch('raw_reaction_remove', raw) @@ -519,7 +519,7 @@ class ConnectionState: def parse_message_reaction_remove_emoji(self, data): emoji = data['emoji'] emoji_id = utils._get_as_snowflake(emoji, 'id') - emoji = PartialEmoji.with_state(self, animated=emoji.get('animated', False), id=emoji_id, name=emoji['name']) + emoji = PartialEmoji.with_state(self, id=emoji_id, name=emoji['name']) raw = RawReactionClearEmojiEvent(data, emoji) self.dispatch('raw_reaction_clear_emoji', raw)