Add support for spoiler attachments.

This commit is contained in:
Rapptz
2018-12-14 19:09:25 -05:00
parent dd884a6afe
commit 93d576a65b
2 changed files with 10 additions and 1 deletions

View File

@ -71,6 +71,10 @@ class Attachment:
self.proxy_url = data.get('proxy_url')
self._http = state.http
def is_spoiler(self):
""":class:`bool`: Whether this attachment contains a spoiler."""
return self.filename.startswith('SPOILER_')
async def save(self, fp, *, seek_begin=True):
"""|coro|