Preview environment

class AutoModerationActionExecution

export class AutoModerationActionExecution

Represents the structure of an executed action when an AutoModerationRule is triggered.

The action that was executed.

alertSystemMessageId : Snowflake | null

The id of any system auto moderation messages posted as a result of this action.

readonly
autoModerationRule : AutoModerationRule | null

The auto moderation rule this action belongs to.

The channel where this action was triggered from.

channelId : Snowflake | null

The id of the channel where this action was triggered from.

content : string

The content that triggered this action. This property requires the GatewayIntentBits.MessageContent privileged gateway intent.

guild : Guild

The guild where this action was executed from.

matchedContent : string | null

The substring in content that triggered this action.

matchedKeyword : string | null

The word or phrase configured in the rule that triggered this action.

readonly
member : GuildMember | null

The guild member that triggered this action.

messageId : Snowflake | null

The id of the message that triggered this action. This will not be present if the message was blocked or the content was not part of any message.

ruleId : Snowflake

The id of the auto moderation rule this action belongs to.

The trigger type of the auto moderation rule which was triggered.

readonly
user : User | null

The user that triggered this action.

userId : Snowflake

The id of the user that triggered this action.