Skip to content

Commit 201f84c

Browse files
authored
fix(message): Fix another crash due to using some attribute that is defined one line below
Signed-off-by: Mathieu <[email protected]>
1 parent f15100b commit 201f84c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

discord/message.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,13 +668,13 @@ def __init__(self, *, state: ConnectionState, channel, data: MessagePayload):
668668
self.components: List[ActionRow] = [ActionRow.from_dict(d) for d in data.get('components', [])]
669669
self.application = data.get('application') # TODO: make this a class
670670
self.activity = data.get('activity') # TODO: make this a class
671+
self.channel: Messageable = channel
671672
interaction = data.get('interaction')
672673
self.interaction: Optional[MessageInteraction] = MessageInteraction(
673674
state=state,
674675
data=interaction,
675676
guild=self.guild
676677
) if interaction else None
677-
self.channel: Messageable = channel
678678
self._edited_timestamp: datetime = utils.parse_time(data['edited_timestamp'])
679679
self.type: MessageType = try_enum(MessageType, data['type'])
680680
self.pinned: bool = data['pinned']

0 commit comments

Comments
 (0)