ActionMetadata
Implementation of a discord automoderation action metadata object as a luau builder.
Summary
Properties
ActionMetadata.channelId :: stringActionMetadata.durationSeconds :: numberActionMetadata.customMessage :: string?Properties
Section titled “Properties”channelId
Section titled “channelId”The ID of the channel where the action should be taken.
durationSeconds
Section titled “durationSeconds”The duration of the action in seconds.
customMessage
Section titled “customMessage”A custom message that will be shown to members when the action is taken.
Methods
Section titled “Methods”setChannelId
Section titled “setChannelId”ActionMetadata : setChannelId ( channelId ) -> ActionMetadata
Sets the ID of the channel where the action should be taken.
Parameters
| channelId: Snowflake |
Returns
| ActionMetadata |
setDurationSeconds
Section titled “setDurationSeconds”ActionMetadata : setDurationSeconds ( durationSeconds ) -> ActionMetadata
Sets the duration of the action in seconds.
Parameters
| durationSeconds: number |
Returns
| ActionMetadata |
setCustomMessage
Section titled “setCustomMessage”ActionMetadata : setCustomMessage ( customMessage ) -> ActionMetadata
Sets a custom message to be sent with the action.
Parameters
| customMessage: string |
Returns
| ActionMetadata |
ActionMetadata : build ( ) -> JSON
Builds the action metadata object.
Returns
| JSON |
Functions
Section titled “Functions”ActionMetadata . new ( resource ) -> ActionMetadata
Responsible for creating a new ActionMetadata.
local metadata = ActionMetadata.new({ channelId = "123456789", durationSeconds = 300, customMessage = "Action taken due to rule violation"})Parameters
| resource: { channelId: apiTypes.Snowflake?, durationSeconds: number?, customMessage: string?, } |
Returns
| ActionMetadata |