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:
|
def is_system(self) -> bool:
|
||||||
""":class:`bool`: Whether the message is a system message.
|
""":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
|
.. 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')
|
@utils.cached_slot_property('_cs_system_content')
|
||||||
def system_content(self):
|
def system_content(self):
|
||||||
@ -1639,7 +1647,7 @@ class PartialMessage(Hashable):
|
|||||||
ChannelType.private,
|
ChannelType.private,
|
||||||
ChannelType.news_thread,
|
ChannelType.news_thread,
|
||||||
ChannelType.public_thread,
|
ChannelType.public_thread,
|
||||||
ChannelType.private_thread
|
ChannelType.private_thread,
|
||||||
):
|
):
|
||||||
raise TypeError(f'Expected TextChannel, DMChannel or Thread not {type(channel)!r}')
|
raise TypeError(f'Expected TextChannel, DMChannel or Thread not {type(channel)!r}')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user