aboutsummaryrefslogtreecommitdiff
path: root/discord/message.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2018-12-14 19:09:25 -0500
committerRapptz <[email protected]>2018-12-14 19:09:25 -0500
commit93d576a65bce7a8ea13dc87331ef5c7c224e9770 (patch)
treec5bbc1a2c886d2d03ebb5ffc22e6b718239e270b /discord/message.py
parentUpdate Message.mention_everyone docs to include @here (diff)
downloaddiscord.py-93d576a65bce7a8ea13dc87331ef5c7c224e9770.tar.xz
discord.py-93d576a65bce7a8ea13dc87331ef5c7c224e9770.zip
Add support for spoiler attachments.
Diffstat (limited to 'discord/message.py')
-rw-r--r--discord/message.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/discord/message.py b/discord/message.py
index b1c24b6d..0d7262f0 100644
--- a/discord/message.py
+++ b/discord/message.py
@@ -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|