Interface AutoModExecution
- All Known Implementing Classes:
AutoModExecutionEvent
public interface AutoModExecution
Event triggered by an
AutoModRule activation.-
Method Summary
Modifier and TypeMethodDescriptiondefault StringThe id of the alertMessagesent to the alert channel.longThe id of the alertMessagesent to the alert channel.TheGuildMessageChannelUnionthat this execution occurred in.The user content that triggered this rule.getGuild()TheGuildthat this execution occurred in.The substring match of the user content that triggered this rule.The keyword that was found in thegetContent().default StringThe id of theMessagewhich triggered the rule.longThe id of theMessagewhich triggered the rule.TheAutoModResponsethat has been triggered by this execution.default StringThe id of theAutoModRulewhich has been triggered.longThe id of theAutoModRulewhich has been triggered.TheAutoModTriggerTypefor the execution.default StringThe id of the user that triggered this execution.longThe id of the user that triggered this execution.
-
Method Details
-
getGuild
TheGuildthat this execution occurred in.- Returns:
- The
Guild
-
getChannel
TheGuildMessageChannelUnionthat this execution occurred in.This might be
nullif the execution occurred by future event types.- Returns:
- The
GuildMessageChannelUnion
-
getResponse
TheAutoModResponsethat has been triggered by this execution.- Returns:
- The
AutoModResponse
-
getTriggerType
TheAutoModTriggerTypefor the execution.- Returns:
- The
AutoModTriggerType
-
getUserIdLong
long getUserIdLong()The id of the user that triggered this execution.- Returns:
- The id of the user
-
getUserId
The id of the user that triggered this execution.- Returns:
- The id of the user
-
getRuleIdLong
long getRuleIdLong()The id of theAutoModRulewhich has been triggered.- Returns:
- The id of the rule
-
getRuleId
The id of theAutoModRulewhich has been triggered.- Returns:
- The id of the rule
-
getMessageIdLong
long getMessageIdLong()The id of theMessagewhich triggered the rule.- Returns:
- The id of the message, or 0 if the message has been blocked
-
getMessageId
The id of theMessagewhich triggered the rule.- Returns:
- The id of the message, or
nullif the message has been blocked
-
getAlertMessageIdLong
long getAlertMessageIdLong()The id of the alertMessagesent to the alert channel.- Returns:
- The id of the alert message, or 0 if
AutoModResponse.getType()is notAutoModResponse.Type.SEND_ALERT_MESSAGE
-
getAlertMessageId
The id of the alertMessagesent to the alert channel.- Returns:
- The id of the alert message, or
nullifAutoModResponse.getType()is notAutoModResponse.Type.SEND_ALERT_MESSAGE
-
getContent
The user content that triggered this rule.This is empty if
GatewayIntent.MESSAGE_CONTENTis not enabled. However, you can still usegetMatchedKeyword()regardless.- Returns:
- The user content
-
getMatchedContent
The substring match of the user content that triggered this rule.This is empty if
GatewayIntent.MESSAGE_CONTENTis not enabled. However, you can still usegetMatchedKeyword()regardless.- Returns:
- The user content substring
-
getMatchedKeyword
The keyword that was found in thegetContent().- Returns:
- The keyword that was found in the content
-