Class AutoModActionExecutedEvent
java.lang.Object
discord4j.core.event.domain.Event
discord4j.core.event.domain.automod.AutoModActionExecutedEvent
Dispatched when an automod action is executed.
This event is dispatched by Discord.
- See Also:
-
Constructor Summary
ConstructorDescriptionAutoModActionExecutedEvent
(GatewayDiscordClient gateway, ShardInfo shardInfo, discord4j.discordjson.json.gateway.AutoModActionExecution autoModActionExecution) -
Method Summary
Modifier and TypeMethodDescriptionGets the automod rule action involved in the event.Requests to retrieve theAutoModRule
related to this event.Gets theSnowflake
ID of theAutoModRule
related to this event.Requests to retrieve theMessageChannel
involved in this event, if present.Gets theSnowflake
ID of theMessageChannel
involved in this event, if present.Gets the User-generated text content.discord4j.discordjson.json.gateway.AutoModActionExecution
getData()
Gets the data of the AutoMod action involved in the event.getGuild()
Requests to retrieve theGuild
involved in the event.Gets the Substring in content that triggered the rule, if present.Gets the Word or phrase configured in the rule that triggered the rule, if present.Requests to retrieve theMessage
involved in this event, if present.Gets theSnowflake
ID of theMessageChannel
involved in this event, if present.Gets the trigger type of rule which was triggeredgetUser()
Requests to retrieve theUser
who's generated the content which triggered the rule.Methods inherited from class discord4j.core.event.domain.Event
getClient, getShardInfo
-
Constructor Details
-
AutoModActionExecutedEvent
public AutoModActionExecutedEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, discord4j.discordjson.json.gateway.AutoModActionExecution autoModActionExecution)
-
-
Method Details
-
getData
public discord4j.discordjson.json.gateway.AutoModActionExecution getData()Gets the data of the AutoMod action involved in the event.- Returns:
- The data of the AutoMod action.
-
getGuildId
- Returns:
- The ID of the
Guild
.
-
getGuild
Requests to retrieve theGuild
involved in the event. -
getAction
Gets the automod rule action involved in the event.- Returns:
- The action of the automod rule.
-
getAutoModRuleId
Gets theSnowflake
ID of theAutoModRule
related to this event.- Returns:
- The ID of the
AutoModRule
related to this event.
-
getAutoModRule
Requests to retrieve theAutoModRule
related to this event.- Returns:
- A
Mono
where, upon successful completion, emits theAutoModRule
involved in this event. If an error is received, it is emitted through theMono
.
-
getTriggerType
Gets the trigger type of rule which was triggered- Returns:
- The trigger type of the automod rule.
-
getUserId
- Returns:
- The ID of the
User
who's triggered the rule.
-
getUser
Requests to retrieve theUser
who's generated the content which triggered the rule. -
getMember
-
getChannelId
- Returns:
- The ID of the
MessageChannel
involved, if present.
-
getChannel
Requests to retrieve theMessageChannel
involved in this event, if present.Message
is in.- Returns:
- A
Mono
where, upon successful completion, emits theMessageChannel
involved. If an error is received, it is emitted through theMono
.
-
getMessageId
- Returns:
- the ID of the
MessageChannel
involved, if present.
-
getMessage
Requests to retrieve theMessage
involved in this event, if present. -
getSystemMessageId
- Returns:
- the ID of the system
Message
involved, if present.
-
getContent
Gets the User-generated text content.- Returns:
- The contents.
-
getMatchedKeyword
Gets the Word or phrase configured in the rule that triggered the rule, if present.- Returns:
- The matched keyword, if present.
-
getMatchedContent
Gets the Substring in content that triggered the rule, if present.- Returns:
- The matched content, if present.
-