mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-21 16:03:10 +00:00
Use __getitem__ to access channel_id in MessageReference payloads
This commit is contained in:
@@ -468,7 +468,7 @@ class MessageReference:
|
||||
def with_state(cls, state: ConnectionState, data: MessageReferencePayload) -> Self:
|
||||
self = cls.__new__(cls)
|
||||
self.message_id = utils._get_as_snowflake(data, 'message_id')
|
||||
self.channel_id = int(data.pop('channel_id'))
|
||||
self.channel_id = int(data['channel_id'])
|
||||
self.guild_id = utils._get_as_snowflake(data, 'guild_id')
|
||||
self.fail_if_not_exists = data.get('fail_if_not_exists', True)
|
||||
self._state = state
|
||||
|
Reference in New Issue
Block a user