mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-10 07:49:48 +00:00
Change Message.__repr__ to show inherited type name
This commit is contained in:
parent
0b577fa209
commit
3d0dd5bc1b
@ -703,8 +703,9 @@ class Message(Hashable):
|
||||
continue
|
||||
|
||||
def __repr__(self) -> str:
|
||||
name = self.__class__.__name__
|
||||
return (
|
||||
f'<Message id={self.id} channel={self.channel!r} type={self.type!r} author={self.author!r} flags={self.flags!r}>'
|
||||
f'<{name} id={self.id} channel={self.channel!r} type={self.type!r} author={self.author!r} flags={self.flags!r}>'
|
||||
)
|
||||
|
||||
def _try_patch(self, data, key, transform=None) -> None:
|
||||
@ -1224,7 +1225,6 @@ class Message(Hashable):
|
||||
flags.suppress_embeds = suppress
|
||||
payload['flags'] = flags.value
|
||||
|
||||
|
||||
if allowed_mentions is MISSING:
|
||||
if self._state.allowed_mentions is not None and self.author.id == self._state.self_id:
|
||||
payload['allowed_mentions'] = self._state.allowed_mentions.to_dict()
|
||||
|
Loading…
x
Reference in New Issue
Block a user