LogoAntiRaid

@discord-types/builders/automoderation/action/metadata

API reference for @discord-types/builders/automoderation/action/metadata

@discord-types/builders/automoderation/action/metadata

Types

ActionMetadata

Raw Type
type ActionMetadata = ActionMetadata.Prototype, & {
	channelId: apiTypes.Snowflake,

	durationSeconds: number,

	customMessage: string?
}

Intersection with variants:

Variant 2
PropTypeDescription
channelId
-
durationSeconds
-
customMessage?
-

JSON

Raw Type
type JSON = ActionMetadata.Prototype.build(nil :: any),

Functions

ActionMetadata.Prototype.setChannelId

[[ Sets the ID of the channel where the action should be taken. ]]

Function Signature
--[[
	Sets the ID of the channel where the action should be taken.
]]
function ActionMetadata.Prototype.setChannelId(self: ActionMetadata, channelId: apiTypes.Snowflake) -> ActionMetadata end

Arguments

channelId

apiTypes.Snowflake

Returns

ret1

ActionMetadata

ActionMetadata.Prototype.setDurationSeconds

[[ Sets the duration of the action in seconds. ]]

Function Signature
--[[
	Sets the duration of the action in seconds.
]]
function ActionMetadata.Prototype.setDurationSeconds(self: ActionMetadata, durationSeconds: number) -> ActionMetadata end

Arguments

durationSeconds

number

Returns

ret1

ActionMetadata

ActionMetadata.Prototype.setCustomMessage

[[ Sets a custom message to be sent with the action. ]]

Function Signature
--[[
	Sets a custom message to be sent with the action.
]]
function ActionMetadata.Prototype.setCustomMessage(self: ActionMetadata, customMessage: string) -> ActionMetadata end

Arguments

customMessage

string

Returns

ret1

ActionMetadata

ActionMetadata.Prototype.build

[[ Builds the action metadata object. ]]

Function Signature
--[[
	Builds the action metadata object.
]]
function ActionMetadata.Prototype.build(self: ActionMetadata) -> JSON end

Returns

ret1

JSON

ActionMetadata.Interface.new

[[ Responsible for creating a new ActionMetadata.

```lua

``` ]]

Function Signature
--[[
	Responsible for creating a new ActionMetadata.

	\`\`\`lua
	
	\`\`\`
]]
function ActionMetadata.Interface.new(resource: {
		channelId: apiTypes.Snowflake?,

		durationSeconds: number?,

		customMessage: string?
	}?) -> ActionMetadata end

Arguments

resource

This field is optional and may not be specified

{channelId: apiTypes.Snowflake?, durationSeconds: number?, customMessage: string?}?

Returns

ret1

ActionMetadata

Last updated on