MessageBuilder
MessageBuilder is used to construct a message that can be sent to a Discord channel, including content, embeds, components, and stickers.
Usage:
Properties
The MessageBuilder instance has no set properties!
Methods
toPayloadObject
MessageBuilder : toPayloadObject () -> Network.Resolvable
Converts the message to a JSON object that can be sent to the Discord API.
setContent
MessageBuilder : setContent () -> Builders.MessageBuilder
content: string
Sets the content of the message.
setNonce
MessageBuilder : setNonce () -> Builders.MessageBuilder
nonce: string
Sets the nonce of the message.
setTTSEnabled
MessageBuilder : setTTSEnabled () -> Builders.MessageBuilder
ttsEnabled: boolean
Sets whether text-to-speech (TTS) is enabled for the message.
addEmbed
MessageBuilder : addEmbed () -> Builders.MessageBuilder
embedBuilder: EmbedBuilder
Adds an embed to the message.
addComponent
MessageBuilder : addComponent () -> Builders.MessageBuilder
discordComponent: InterfaceBuilder
Adds a component to the message.
addStickerId
MessageBuilder : addStickerId () -> Builders.MessageBuilder
stickerId: string
Adds a sticker ID to the message.
setFlags
MessageBuilder : setFlags () -> Builders.MessageBuilder
flags: number
Sets the flags for the message.
addFile
MessageBuilder : addFile () -> Builders.MessageBuilder
fileContent: string
fileName: string
Add a file to the Message object
toJsonObject
MessageBuilder : toJsonObject () -> table
Converts the message to a JSON object that can be sent to the Discord API.
toPayloadObject
MessageBuilder : toPayloadObject () -> Network.Resolvable
Converts the message to a JSON object that can be sent to the Discord API.
Functions
new
MessageBuilder . new () -> ()
Creates a new instance of MessageBuilder.