From 2cd6d771eceebfa8aeb641ebd5abb454d8b52d3e Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sun, 26 May 2019 02:28:49 -0400 Subject: Make __repr__ slightly more detailed and add a few missing ones. This includes raw events (which didn't have any) and a few other types that were missing them. Upon review some more useful fields were added to the repr output which would be more useful during debugging. --- discord/message.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'discord/message.py') diff --git a/discord/message.py b/discord/message.py index 8bbf539c..5ed97d59 100644 --- a/discord/message.py +++ b/discord/message.py @@ -78,6 +78,9 @@ class Attachment: """:class:`bool`: Whether this attachment contains a spoiler.""" return self.filename.startswith('SPOILER_') + def __repr__(self): + return ''.format(self) + async def save(self, fp, *, seek_begin=True, use_cached=False): """|coro| @@ -263,7 +266,7 @@ class Message: self._update(channel, data) def __repr__(self): - return ''.format(self) + return ''.format(self) def _try_patch(self, data, key, transform=None): try: -- cgit v1.2.3