Browse Source

Update documentation for discord.Message

Co-authored-by: Danny <[email protected]>
pull/8181/head
Emily 3 years ago
committed by GitHub
parent
commit
55849d996e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      discord/message.py

8
discord/message.py

@ -1311,11 +1311,15 @@ class Message(PartialMessage, Hashable):
private channel or the user has the left the guild, then it is a :class:`User` instead. private channel or the user has the left the guild, then it is a :class:`User` instead.
content: :class:`str` content: :class:`str`
The actual contents of the message. The actual contents of the message.
If :attr:`Intents.message_content` is not enabled this will always be an empty string
unless the bot is mentioned or the message is a direct message.
nonce: Optional[Union[:class:`str`, :class:`int`]] nonce: Optional[Union[:class:`str`, :class:`int`]]
The value used by the discord guild and the client to verify that the message is successfully sent. The value used by the discord guild and the client to verify that the message is successfully sent.
This is not stored long term within Discord's servers and is only used ephemerally. This is not stored long term within Discord's servers and is only used ephemerally.
embeds: List[:class:`Embed`] embeds: List[:class:`Embed`]
A list of embeds the message has. A list of embeds the message has.
If :attr:`Intents.message_content` is not enabled this will always be an empty list
unless the bot is mentioned or the message is a direct message.
channel: Union[:class:`TextChannel`, :class:`VoiceChannel`, :class:`Thread`, :class:`DMChannel`, :class:`GroupChannel`, :class:`PartialMessageable`] channel: Union[:class:`TextChannel`, :class:`VoiceChannel`, :class:`Thread`, :class:`DMChannel`, :class:`GroupChannel`, :class:`PartialMessageable`]
The :class:`TextChannel` or :class:`Thread` that the message was sent from. The :class:`TextChannel` or :class:`Thread` that the message was sent from.
Could be a :class:`DMChannel` or :class:`GroupChannel` if it's a private message. Could be a :class:`DMChannel` or :class:`GroupChannel` if it's a private message.
@ -1357,6 +1361,8 @@ class Message(PartialMessage, Hashable):
message. message.
attachments: List[:class:`Attachment`] attachments: List[:class:`Attachment`]
A list of attachments given to a message. A list of attachments given to a message.
If :attr:`Intents.message_content` is not enabled this will always be an empty list
unless the bot is mentioned or the message is a direct message.
pinned: :class:`bool` pinned: :class:`bool`
Specifies if the message is currently pinned. Specifies if the message is currently pinned.
flags: :class:`MessageFlags` flags: :class:`MessageFlags`
@ -1386,6 +1392,8 @@ class Message(PartialMessage, Hashable):
.. versionadded:: 1.6 .. versionadded:: 1.6
components: List[Union[:class:`ActionRow`, :class:`Button`, :class:`SelectMenu`]] components: List[Union[:class:`ActionRow`, :class:`Button`, :class:`SelectMenu`]]
A list of components in the message. A list of components in the message.
If :attr:`Intents.message_content` is not enabled this will always be an empty list
unless the bot is mentioned or the message is a direct message.
.. versionadded:: 2.0 .. versionadded:: 2.0
interaction: Optional[:class:`MessageInteraction`] interaction: Optional[:class:`MessageInteraction`]

Loading…
Cancel
Save