Browse Source

Added repr to interaction callback

pull/9957/head
Developer Anonymous 7 months ago
parent
commit
dd0a4ee6e7
  1. 3
      discord/interactions.py

3
discord/interactions.py

@ -688,6 +688,9 @@ class InteractionCallback(Generic[ClientT]):
self.response_channel: InteractionChannel = channel
self._update(data)
def __repr__(self) -> str:
return f'<InteractionCallback id={self.id} interaction_type={self.interaction_type!r} callback_type={self.callback_type!r}>'
def _update(self, data: InteractionCallbackResponsePayload) -> None:
interaction = data['interaction']
self.id: int = int(interaction['id'])

Loading…
Cancel
Save