mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +00:00
Fix documentation for Message.is_system
Also fixes some formatting
This commit is contained in:
parent
27debe18ca
commit
3b4c6269be
@ -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}')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user