From 93d576a65bce7a8ea13dc87331ef5c7c224e9770 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 14 Dec 2018 19:09:25 -0500 Subject: Add support for spoiler attachments. --- discord/message.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'discord/message.py') 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| -- cgit v1.2.3