Message

Description

Represents a message within a communication platform, typically within a chat or channel. This data type encompasses various attributes of a message, including its content, author, channel, and any associated reactions, attachments, or mentions.

Properties

  • ID: The unique identifier of the message.

  • Content: The text content of the message with mentions (users, roles) resolved.

  • Raw content: The original text content of the message with unresolved mentions.

  • Author: The user who sent the message.

  • Channel: The channel where the message was posted.

  • Reactions: A list of reactions added to the message, represented as MessageReaction.

  • Pinned: Indicates whether the message is pinned in the channel (Yes or No).

  • Link: The URL link to the message.

  • Attachments: A list of files or media attached to the message, represented as MessageAttachment.

  • Mentions: An object containing details about users, roles, and members mentioned in the message:

    • Members: Mentioned members (directly or through role, excluding @everyone).

    • Roles: Mentioned roles.

    • Users: Mentioned users, which may include non-guild members.

    • Mentions everyone: Indicates whether @everyone or @here was used (Yes or No).

  • Poll: An optional poll associated with the message, containing:

    • Question: The poll question.

    • Answers: A list of possible answers, each with text and an optional emoji.

    • Expires at: The expiration date and time of the poll.

    • Multiselect: Indicates whether multiple answers can be selected (Yes or No).

Last updated