LogoAntiRaid

@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
PropTypeDescription
content?
-
embeds
-
allowedMentions?
-
components
-
stickerIds
-
attachments
-
flags?
-

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

string

Returns

ret1

MessageParams

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

embed.JSON

Returns

ret1

MessageParams

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

allowedMention.JSON

Returns

ret1

MessageParams

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 1

button.JSON

Variant 2

textInput.JSON

Variant 3

selectMenu.JSON

Variant 4

actionRow.JSON

Returns

ret1

MessageParams

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

string

Returns

ret1

MessageParams

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

attachment.JSON

Returns

ret1

MessageParams

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

number

Returns

ret1

MessageParams

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

JSON

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

MessageParams

Last updated on