Skip to content

Action

Implementation of a discord automod action object as a luau builder.

Action.type  :: ActionTypes

The type of action to perform when a rule is triggered.

Action.metadata  :: ActionMetadata

Additional metadata needed during execution for this specific action type.

Action : setType ( type )  -> Action

Sets the type of the action.

Parameters

type: ActionTypes

Returns

Action
Action : setMetadata ( metadata )  -> Action

Sets the action metadata.

Parameters

metadata: JSON

Returns

Action
Action : build ( )  -> JSON

Builds the action object.

Returns

JSON
Action . new ( resource )  -> Action

Responsible for creating a new Action.

Parameters

resource: {
type: apiTypes.ActionTypes?,
metadata: metadata.JSON?,
}

Returns

Action