mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-22 08:44:10 +00:00
Add Message.is_system to more intuitively filter system messages.
This commit is contained in:
parent
3dc9f40be7
commit
1488957a6f
@ -567,6 +567,13 @@ class Message:
|
||||
guild_id = getattr(self.guild, 'id', '@me')
|
||||
return 'https://discordapp.com/channels/{0}/{1.channel.id}/{1.id}'.format(guild_id, self)
|
||||
|
||||
def is_system(self):
|
||||
""":class:`bool`: Whether the message is a system message.
|
||||
|
||||
..versionadded:: 1.3
|
||||
"""
|
||||
return self.type is not MessageType.default
|
||||
|
||||
@utils.cached_slot_property('_cs_system_content')
|
||||
def system_content(self):
|
||||
r"""A property that returns the content that is rendered
|
||||
|
Loading…
x
Reference in New Issue
Block a user