aboutsummaryrefslogtreecommitdiff
path: root/discord
diff options
context:
space:
mode:
authorRapptz <[email protected]>2021-08-18 01:01:24 -0400
committerRapptz <[email protected]>2021-08-18 01:01:24 -0400
commit3b4c6269be43ca81f8e9113432b9033b6be60332 (patch)
treeda987140f63e290662f868c644bb023bd0ed71f9 /discord
parentUpdate Permissions classmethods to include thread/stage/sticker (diff)
downloaddiscord.py-3b4c6269be43ca81f8e9113432b9033b6be60332.tar.xz
discord.py-3b4c6269be43ca81f8e9113432b9033b6be60332.zip
Fix documentation for Message.is_system
Also fixes some formatting
Diffstat (limited to 'discord')
-rw-r--r--discord/message.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/discord/message.py b/discord/message.py
index 2f499b60..a0842d58 100644
--- a/discord/message.py
+++ b/discord/message.py
@@ -977,9 +977,17 @@ class Message(Hashable):
def is_system(self) -> bool:
""":class:`bool`: Whether the message is a system message.
+ A system message is a message that is constructed entirely by the Discord API
+ in response to something.
+
.. versionadded:: 1.3
"""
- return self.type not in (MessageType.default, MessageType.reply, MessageType.application_command, MessageType.thread_starter_message)
+ return self.type not in (
+ MessageType.default,
+ MessageType.reply,
+ MessageType.application_command,
+ MessageType.thread_starter_message,
+ )
@utils.cached_slot_property('_cs_system_content')
def system_content(self):
@@ -1485,7 +1493,7 @@ class Message(Hashable):
:attr:`~discord.Permissions.use_threads` in order to create a thread.
The channel this message belongs in must be a :class:`TextChannel`.
-
+
.. versionadded:: 2.0
Parameters
@@ -1639,7 +1647,7 @@ class PartialMessage(Hashable):
ChannelType.private,
ChannelType.news_thread,
ChannelType.public_thread,
- ChannelType.private_thread
+ ChannelType.private_thread,
):
raise TypeError(f'Expected TextChannel, DMChannel or Thread not {type(channel)!r}')