@discord-types/builders/thread/messageParams
API reference for @discord-types/builders/thread/messageParams
@discord-types/builders/thread/messageParams
Types
MessageParams
Raw Type
type MessageParams = MessageParams.Prototype, & {
content: string?,
embeds: {embed.JSON},
allowedMentions: allowedMention.JSON?,
components: {button.JSON | textInput.JSON | selectMenu.JSON | actionRow.JSON},
stickerIds: {string},
attachments: {attachment.JSON},
flags: number?
}
Intersection with variants:
Variant 2
JSON
Raw Type
type JSON = MessageParams.Prototype.build(nil :: any),
Functions
MessageParams.Prototype.setContent
[[ Sets the content of the message. ]]
Function Signature
--[[
Sets the content of the message.
]]
function MessageParams.Prototype.setContent(self: MessageParams, content: string) -> MessageParams end
Arguments
content
Returns
ret1
MessageParams.Prototype.addEmbed
[[ Adds an embed to the message. ]]
Function Signature
--[[
Adds an embed to the message.
]]
function MessageParams.Prototype.addEmbed(self: MessageParams, embedData: embed.JSON) -> MessageParams end
Arguments
embedData
Returns
ret1
MessageParams.Prototype.setAllowedMentions
[[ Sets the allowed mentions for the message. ]]
Function Signature
--[[
Sets the allowed mentions for the message.
]]
function MessageParams.Prototype.setAllowedMentions(self: MessageParams, mentions: allowedMention.JSON) -> MessageParams end
Arguments
mentions
Returns
ret1
MessageParams.Prototype.addComponent
[[ Adds a component to the message. ]]
Function Signature
--[[
Adds a component to the message.
]]
function MessageParams.Prototype.addComponent(self: MessageParams, component: button.JSON | textInput.JSON | selectMenu.JSON | actionRow.JSON) -> MessageParams end
Arguments
component
Union with variants:
Variant 3
Returns
ret1
MessageParams.Prototype.addStickerId
[[ Adds a sticker ID to the message. ]]
Function Signature
--[[
Adds a sticker ID to the message.
]]
function MessageParams.Prototype.addStickerId(self: MessageParams, stickerId: string) -> MessageParams end
Arguments
stickerId
Returns
ret1
MessageParams.Prototype.addAttachment
[[ Adds an attachment to the message. ]]
Function Signature
--[[
Adds an attachment to the message.
]]
function MessageParams.Prototype.addAttachment(self: MessageParams, attachmentData: attachment.JSON) -> MessageParams end
Arguments
attachmentData
Returns
ret1
MessageParams.Prototype.setFlags
[[ Sets the flags for the message. ]]
Function Signature
--[[
Sets the flags for the message.
]]
function MessageParams.Prototype.setFlags(self: MessageParams, flags: number) -> MessageParams end
Arguments
flags
Returns
ret1
MessageParams.Prototype.build
[[ Responsible for building the MessageParams JSON that can be parsed by the Discord API. ]]
Function Signature
--[[
Responsible for building the MessageParams JSON that can be parsed by the Discord API.
]]
function MessageParams.Prototype.build(self: MessageParams) -> JSON end
Returns
ret1
MessageParams.Interface.new
[[ Responsible for creating a new MessageParams.
```lua
``` ]]
Function Signature
--[[
Responsible for creating a new MessageParams.
\`\`\`lua
\`\`\`
]]
function MessageParams.Interface.new(resource: {
content: string?,
embeds: {embed.JSON}?,
allowedMentions: allowedMention.JSON?,
components: {button.JSON | textInput.JSON | selectMenu.JSON | actionRow.JSON}?,
stickerIds: {string}?,
attachments: {attachment.JSON}?,
flags: number?
}?) -> MessageParams end
Arguments
resource
This field is optional and may not be specified
{content: string?, embeds: {embed.JSON}?, allowedMentions: allowedMention.JSON?, components: {(button.JSON | textInput.JSON | selectMenu.JSON | actionRow.JSON)}?, stickerIds: {string}?, attachments: {attachment.JSON}?, flags: number?}?
Returns
ret1
Last updated on