Message
Implementation of discords Message object as a Luau builder.
https://discord.com/developers/docs/resources/message#message-object
Properties
The Message instance has no set properties!
Methods
The Message instance has no set methods!
Functions
setContent
Message . setContent () -> ()
self: Message
content: string
Sets the content of the message.
setNonce
Message . setNonce () -> ()
self: Message
nonce: string
Sets the nonce of the message.
setTTS
Message . setTTS () -> ()
self: Message
tts: boolean
Sets whether the message is text-to-speech.
addEmbed
Message . addEmbed () -> ()
self: Message
embedData: embed.JSON
Adds an embed to the message.
setAllowedMentions
Message . setAllowedMentions () -> ()
self: Message
mentions: allowedMention.JSON
Sets the allowed mentions for the message.
setMessageReference
Message . setMessageReference () -> ()
self: Message
ref: reference.JSON
Sets the message reference.
addComponent
Message . addComponent () -> ()
self: Message
component: button.JSON
| textInput.JSON
| selectMenu.JSON
| actionRow.JSON
Adds a component to the message.
addStickerId
Message . addStickerId () -> ()
self: Message
stickerId: string
Adds a sticker ID to the message.
addAttachment
Message . addAttachment () -> ()
self: Message
data: string
name: string?
Adds an attachment to the message.
setFlags
Message . setFlags () -> ()
self: Message
flags: number
Sets the flags for the message.
setEnforceNonce
Message . setEnforceNonce () -> ()
self: Message
enforceNonce: boolean
If true and nonce is present, it will be checked for uniqueness in the past few minutes.
setPoll
Message . setPoll () -> ()
self: Message
poll: poll.JSON
Sets the poll for the message.
build
Message . build () -> ()
self: Message
Responsible for building the Message JSON that can be parsed by the Discord API.
new
Message . new () -> ()
resource: {
content: string?,
nonce: string?,
tts: boolean?,
embeds: { embed.JSON,
}
| textInput.JSON
| selectMenu.JSON
| actionRow.JSON }?, stickerIds: { string }?, attachments: { Attachment }?, flags: number?, enforceNonce: boolean?, poll: poll.JSON?, }?
Responsible for creating a new Message.