This commit is contained in:
iDutchy
2020-10-17 18:42:19 -05:00
parent a09e096d42
commit d75cd66b90
14 changed files with 128 additions and 5 deletions

View File

@@ -84,6 +84,9 @@ class Attachment:
""":class:`bool`: Whether this attachment contains a spoiler."""
return self.filename.startswith('SPOILER_')
def __int__(self):
return self.id
def __repr__(self):
return '<Attachment id={0.id} filename={0.filename!r} url={0.url!r}>'.format(self)
@@ -385,6 +388,12 @@ class Message:
except KeyError:
continue
def __str__(self):
return self.content
def __int__(self):
return self.id
def __repr__(self):
return '<Message id={0.id} channel={0.channel!r} type={0.type!r} author={0.author!r} flags={0.flags!r}>'.format(self)