Creates a new MessagePayload
instance.
Optional
data: { Optional initial data to set in the payload.
Optional
allowed_Optional
everyone?: booleanOptional
repliedOptional
roles?: boolean | string[]Optional
users?: boolean | string[]Optional
attachments?: { Optional
components?: any[]Optional
content?: stringOptional
embeds?: any[]Optional
enforce_Optional
flags?: numberOptional
message_Optional
channelID?: stringOptional
failOptional
guildID?: stringOptional
nonce?: string | numberOptional
poll?: anyOptional
sticker_Optional
tts?: booleanGets the allowed mentions for the message.
The allowed mentions object.
Optional
everyone?: booleanOptional
repliedOptional
roles?: boolean | string[]Optional
users?: boolean | string[]Sets the allowed mentions for the message.
The allowed mentions object.
Optional
everyone?: booleanOptional
repliedOptional
roles?: boolean | string[]Optional
users?: 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.
Optional
channelID?: stringOptional
failOptional
guildID?: stringSets the message reference object for replies or forwards.
The message reference object. Must include messageID
.
Optional
channelID?: stringOptional
failOptional
guildID?: 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.