Class AutoModActionExecutedEvent

java.lang.Object
discord4j.core.event.domain.Event
discord4j.core.event.domain.automod.AutoModActionExecutedEvent

public class AutoModActionExecutedEvent extends Event
Dispatched when an automod action is executed. This event is dispatched by Discord.
See Also:
  • 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

      public Snowflake getGuildId()
      Gets the Snowflake ID of the Guild involved in the event.
      Returns:
      The ID of the Guild.
    • getGuild

      public Mono<Guild> getGuild()
      Requests to retrieve the Guild involved in the event.
      Returns:
      A Mono where, upon successful completion, emits the Guild involved. If an error is received, it is emitted through the Mono.
    • getAction

      public AutoModRuleAction getAction()
      Gets the automod rule action involved in the event.
      Returns:
      The action of the automod rule.
    • getAutoModRuleId

      public Snowflake getAutoModRuleId()
      Gets the Snowflake ID of the AutoModRule related to this event.
      Returns:
      The ID of the AutoModRule related to this event.
    • getAutoModRule

      public Mono<AutoModRule> getAutoModRule()
      Requests to retrieve the AutoModRule related to this event.
      Returns:
      A Mono where, upon successful completion, emits the AutoModRule involved in this event. If an error is received, it is emitted through the Mono.
    • getTriggerType

      public AutoModRule.TriggerType getTriggerType()
      Gets the trigger type of rule which was triggered
      Returns:
      The trigger type of the automod rule.
    • getUserId

      public Snowflake getUserId()
      Gets the Snowflake ID of the User who's generated the content which triggered the rule.
      Returns:
      The ID of the User who's triggered the rule.
    • getUser

      public Mono<User> getUser()
      Requests to retrieve the User who's generated the content which triggered the rule.
      Returns:
      A Mono where, upon successful completion, emits the User involved in this event. If an error is received, it is emitted through the Mono.
    • getMember

      public Mono<Member> getMember()
      Requests to retrieve the Member object of the User involved in this event.
      Returns:
      A Mono where, upon successful completion, emits the Member involved in this event. If an error is received, it is emitted through the Mono.
    • getChannelId

      public Optional<Snowflake> getChannelId()
      Gets the Snowflake ID of the MessageChannel involved in this event, if present. Message is in.
      Returns:
      The ID of the MessageChannel involved, if present.
    • getChannel

      public Mono<MessageChannel> getChannel()
      Requests to retrieve the MessageChannel involved in this event, if present. Message is in.
      Returns:
      A Mono where, upon successful completion, emits the MessageChannel involved. If an error is received, it is emitted through the Mono.
    • getMessageId

      public Optional<Snowflake> getMessageId()
      Gets the Snowflake ID of the MessageChannel involved in this event, if present. Message is in.
      Returns:
      the ID of the MessageChannel involved, if present.
    • getMessage

      public Mono<Message> getMessage()
      Requests to retrieve the Message involved in this event, if present.
      Returns:
      A Mono where, upon successful completion, emits the Message involved. If an error is received, it is emitted through the Mono.
    • getSystemMessageId

      public Optional<Snowflake> getSystemMessageId()
      Gets the Snowflake ID of the system Message involved in this event, if present. Message is in.
      Returns:
      the ID of the system Message involved, if present.
    • getContent

      public String getContent()
      Gets the User-generated text content.
      Returns:
      The contents.
    • getMatchedKeyword

      public Optional<String> getMatchedKeyword()
      Gets the Word or phrase configured in the rule that triggered the rule, if present.
      Returns:
      The matched keyword, if present.
    • getMatchedContent

      public Optional<String> getMatchedContent()
      Gets the Substring in content that triggered the rule, if present.
      Returns:
      The matched content, if present.