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.
This commit is contained in:
@ -78,6 +78,9 @@ class Attachment:
|
||||
""":class:`bool`: Whether this attachment contains a spoiler."""
|
||||
return self.filename.startswith('SPOILER_')
|
||||
|
||||
def __repr__(self):
|
||||
return '<Attachment id={0.id} filename={0.filename!r} url={0.url!r}>'.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 '<Message id={0.id} pinned={0.pinned} author={0.author!r}>'.format(self)
|
||||
return '<Message id={0.id} channel={0.channel!r} type={0.type!r} author={0.author!r}>'.format(self)
|
||||
|
||||
def _try_patch(self, data, key, transform=None):
|
||||
try:
|
||||
|
Reference in New Issue
Block a user