Nostrum.Struct.Event.AutoModerationRuleExecute (nostrum v0.11.0-dev)

View Source

Sent when an auto-moderation rule executes. (e.g. message is blocked).

Summary

Types

The action that was executed

The id of any system message that was generated as a result of the action

The id of the channel in which the content was posted

The content of the message which triggered the rule

The id of the guild in which the action was executed

The substring which matched the content

The keyword that was matched in the content

The id of the message which was posted

The id of the rule that was executed

The type of the rule that was executed

t()

The id of the user which generated the content which triggered the rule

Types

action()

(since 0.7.0)

The action that was executed

alert_system_message_id()

(since 0.7.0)
@type alert_system_message_id() :: Nostrum.Struct.Message.id() | nil

The id of any system message that was generated as a result of the action

note: will not exist if the event does not correspond to an action that generates a system message

channel_id()

(since 0.7.0)
@type channel_id() :: Nostrum.Struct.Channel.id() | nil

The id of the channel in which the content was posted

note: this field may not exist if the content was blocked from being created

content()

(since 0.7.0)
@type content() :: String.t()

The content of the message which triggered the rule

guild_id()

(since 0.7.0)
@type guild_id() :: Nostrum.Struct.Guild.id()

The id of the guild in which the action was executed

matched_content()

(since 0.7.0)
@type matched_content() :: String.t() | nil

The substring which matched the content

matched_keyword()

(since 0.7.0)
@type matched_keyword() :: String.t() | nil

The keyword that was matched in the content

message_id()

(since 0.7.0)
@type message_id() :: Nostrum.Struct.Message.id() | nil

The id of the message which was posted

note: this field will not exist if the content was blocked from being created

rule_id()

(since 0.7.0)

The id of the rule that was executed

rule_trigger_type()

(since 0.7.0)
@type rule_trigger_type() :: Nostrum.Struct.AutoModerationRule.trigger_type()

The type of the rule that was executed

t()

(since 0.7.0)
@type t() :: %Nostrum.Struct.Event.AutoModerationRuleExecute{
  action: action(),
  alert_system_message_id: alert_system_message_id(),
  channel_id: channel_id(),
  content: content(),
  guild_id: guild_id(),
  matched_content: matched_content(),
  matched_keyword: matched_keyword(),
  message_id: message_id(),
  rule_id: rule_id(),
  rule_trigger_type: rule_trigger_type(),
  user_id: user_id()
}

user_id()

(since 0.7.0)
@type user_id() :: Nostrum.Struct.User.id()

The id of the user which generated the content which triggered the rule