Interface AutoModExecution
- All Known Implementing Classes:
AutoModExecutionEvent
public interface AutoModExecution
Event triggered by an
AutoModRule
activation.-
Method Summary
Modifier and TypeMethodDescriptiondefault String
The id of the alertMessage
sent to the alert channel.long
The id of the alertMessage
sent to the alert channel.TheGuildMessageChannelUnion
that this execution occurred in.The user content that triggered this rule.getGuild()
TheGuild
that this execution occurred in.The substring match of the user content that triggered this rule.The keyword that was found in thegetContent()
.default String
The id of theMessage
which triggered the rule.long
The id of theMessage
which triggered the rule.TheAutoModResponse
that has been triggered by this execution.default String
The id of theAutoModRule
which has been triggered.long
The id of theAutoModRule
which has been triggered.TheAutoModTriggerType
for the execution.default String
The id of the user that triggered this execution.long
The id of the user that triggered this execution.
-
Method Details
-
getGuild
TheGuild
that this execution occurred in.- Returns:
- The
Guild
-
getChannel
TheGuildMessageChannelUnion
that this execution occurred in.This might be
null
if the execution occurred by future event types.- Returns:
- The
GuildMessageChannelUnion
-
getResponse
TheAutoModResponse
that has been triggered by this execution.- Returns:
- The
AutoModResponse
-
getTriggerType
TheAutoModTriggerType
for 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 theAutoModRule
which has been triggered.- Returns:
- The id of the rule
-
getRuleId
The id of theAutoModRule
which has been triggered.- Returns:
- The id of the rule
-
getMessageIdLong
long getMessageIdLong()The id of theMessage
which triggered the rule.- Returns:
- The id of the message, or 0 if the message has been blocked
-
getMessageId
The id of theMessage
which triggered the rule.- Returns:
- The id of the message, or
null
if the message has been blocked
-
getAlertMessageIdLong
long getAlertMessageIdLong()The id of the alertMessage
sent 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 alertMessage
sent to the alert channel.- Returns:
- The id of the alert message, or
null
ifAutoModResponse.getType()
is notAutoModResponse.Type.SEND_ALERT_MESSAGE
-
getContent
The user content that triggered this rule.This is empty if
GatewayIntent.MESSAGE_CONTENT
is 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_CONTENT
is 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
-