Creates a new MessagePayload instance.
Optionaldata: { Optional initial data to set in the payload.
Optionalallowed_Optionaleveryone?: booleanOptionalrepliedOptionalroles?: boolean | string[]Optionalusers?: boolean | string[]Optionalattachments?: { Optionalcomponents?: any[]Optionalcontent?: stringOptionalembeds?: any[]Optionalenforce_Optionalflags?: numberOptionalmessage_OptionalchannelID?: stringOptionalfailOptionalguildID?: stringOptionalnonce?: string | numberOptionalpoll?: anyOptionalsticker_Optionaltts?: booleanGets the allowed mentions for the message.
The allowed mentions object.
Optionaleveryone?: booleanOptionalrepliedOptionalroles?: boolean | string[]Optionalusers?: boolean | string[]Sets the allowed mentions for the message.
The allowed mentions object.
Optionaleveryone?: booleanOptionalrepliedOptionalroles?: boolean | string[]Optionalusers?: boolean | string[]Gets the attachments for the message.
An array of attachment objects.
Sets the attachments for the message.
An array of attachment objects.
Gets the components for the message.
An array of message component objects.
Sets the components for the message.
An array of message component objects.
Gets the content of the message.
The message content.
Sets the content of the message.
The message content. Should be up to 2000 characters.
Gets the embeds for the message.
An array of embed objects.
Sets the embeds for the message.
An array of embed objects. Up to 10 embeds allowed.
Gets the enforce nonce flag.
True if nonce uniqueness should be enforced.
Sets the enforce nonce flag.
True if nonce uniqueness should be enforced.
Gets the flags for the message.
The message flags.
Sets the flags for the message.
The message flags as a bitfield.
Gets the message reference object.
The message reference object.
OptionalchannelID?: stringOptionalfailOptionalguildID?: stringSets the message reference object for replies or forwards.
The message reference object. Must include messageID.
OptionalchannelID?: stringOptionalfailOptionalguildID?: stringGets the nonce for the message.
The nonce value.
Sets the nonce for the message.
The nonce value. Should be up to 25 characters if string.
Gets the poll object for the message.
The poll object.
Sets the poll object for the message.
The poll object.
Gets the sticker IDs for the message.
An array of sticker IDs.
Sets the sticker IDs for the message.
An array of sticker IDs. Up to 3 stickers allowed.
Gets the TTS flag for the message.
True if the message is a TTS message.
Sets the TTS flag for the message.
True if the message should be sent as TTS.
Represents the payload for creating or updating a message. This class encapsulates all the parameters needed to send a message in Discord.