#[non_exhaustive]pub struct AutoModerationActionExecution {
pub guild_id: GuildId,
pub action: Action,
pub rule_id: AutoModerationRuleId,
pub rule_trigger_type: TriggerType,
pub user_id: UserId,
pub channel_id: Option<ChannelId>,
pub message_id: Option<MessageId>,
pub alert_system_message_id: Option<MessageId>,
pub content: CompactString,
pub matched_keyword: Option<CompactString>,
pub matched_content: Option<CompactString>,
}Expand description
The data of the Auto Moderation Action Execution
dispatch event: a rule triggered and one of its actions ran (requires MANAGE_GUILD; the
content fields require the MESSAGE_CONTENT intent).
discord.js counterpart: the AutoModerationActionExecution event.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.guild_id: GuildIdThe guild.
action: ActionThe action that ran.
rule_id: AutoModerationRuleIdThe rule.
rule_trigger_type: TriggerTypeThe rule’s trigger type.
user_id: UserIdThe user whose content triggered the rule.
channel_id: Option<ChannelId>The channel the content was posted in.
message_id: Option<MessageId>The user’s message (absent if it was blocked or the content was not a message).
alert_system_message_id: Option<MessageId>The alert message posted by a SEND_ALERT_MESSAGE action.
content: CompactStringThe user’s content (empty without the MESSAGE_CONTENT intent).
matched_keyword: Option<CompactString>The keyword or phrase of the rule that matched.
matched_content: Option<CompactString>The part of the content that matched (None without the MESSAGE_CONTENT intent).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AutoModerationActionExecution
impl<'de> Deserialize<'de> for AutoModerationActionExecution
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AutoModerationActionExecution
impl StructuralPartialEq for AutoModerationActionExecution
Auto Trait Implementations§
impl Freeze for AutoModerationActionExecution
impl RefUnwindSafe for AutoModerationActionExecution
impl Send for AutoModerationActionExecution
impl Sync for AutoModerationActionExecution
impl Unpin for AutoModerationActionExecution
impl UnsafeUnpin for AutoModerationActionExecution
impl UnwindSafe for AutoModerationActionExecution
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more