diff --git a/discord/interactions.py b/discord/interactions.py index e0fb7ed86..49bfbfb07 100644 --- a/discord/interactions.py +++ b/discord/interactions.py @@ -192,6 +192,9 @@ class Interaction(Generic[ClientT]): self.command_failed: bool = False self._from_data(data) + def __repr__(self) -> str: + return f'<{self.__class__.__name__} id={self.id} type={self.type!r} guild_id={self.guild_id!r} user={self.user!r}>' + def _from_data(self, data: InteractionPayload): self.id: int = int(data['id']) self.type: InteractionType = try_enum(InteractionType, data['type'])