From 86f10f6dd6cb02d5feab828e37f657a60b1f7773 Mon Sep 17 00:00:00 2001 From: Steve C Date: Sat, 17 Apr 2021 18:56:08 -0400 Subject: [PATCH] Add missing reprs to some objects These are WidgetMember, BaseUser, and DeletedReferencedMessage --- discord/message.py | 3 +++ discord/user.py | 6 ++++++ discord/widget.py | 6 ++++++ 3 files changed, 15 insertions(+) diff --git a/discord/message.py b/discord/message.py index df0b8243f..90f4d6e95 100644 --- a/discord/message.py +++ b/discord/message.py @@ -273,6 +273,9 @@ class DeletedReferencedMessage: def __init__(self, parent): self._parent = parent + def __repr__(self): + return f"" + @property def id(self): """:class:`int`: The message ID of the deleted referenced message.""" diff --git a/discord/user.py b/discord/user.py index 888c5c951..6c3196689 100644 --- a/discord/user.py +++ b/discord/user.py @@ -44,6 +44,12 @@ class BaseUser(_BaseUser): self._state = state self._update(data) + def __repr__(self): + return ( + f"" + ) + def __str__(self): return f'{self.name}#{self.discriminator}' diff --git a/discord/widget.py b/discord/widget.py index 93a46be71..c09bfa981 100644 --- a/discord/widget.py +++ b/discord/widget.py @@ -157,6 +157,12 @@ class WidgetMember(BaseUser): self.connected_channel = connected_channel + def __repr__(self): + return ( + f"" + ) + @property def display_name(self): """:class:`str`: Returns the member's display name."""