From 3b4c6269be43ca81f8e9113432b9033b6be60332 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Wed, 18 Aug 2021 01:01:24 -0400 Subject: [PATCH] Fix documentation for Message.is_system Also fixes some formatting --- discord/message.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/discord/message.py b/discord/message.py index 2f499b60e..a0842d587 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}')