pub struct AutoModRule {
pub id: Snowflake,
pub guild_id: Snowflake,
pub name: String,
pub creator_id: Snowflake,
pub event_type: AutoModEventType,
pub trigger_type: AutoModTriggerType,
pub trigger_metadata: AutoModTriggerMetadata,
pub actions: Vec<AutoModAction>,
pub enabled: bool,
pub exempt_roles: Vec<Snowflake>,
pub exempt_channels: Vec<Snowflake>,
}Expand description
An AutoMod rule.
Fields§
§id: SnowflakeThe ID of this rule.
guild_id: SnowflakeThe ID of the guild which this rule belongs to.
name: StringThe rule name.
creator_id: SnowflakeThe user which first created this rule.
event_type: AutoModEventTypeThe rule event type.
trigger_type: AutoModTriggerTypeThe rule trigger type.
trigger_metadata: AutoModTriggerMetadataThe rule trigger metadata.
actions: Vec<AutoModAction>The actions which will execute when the rule is triggered.
enabled: boolWhether the rule is enabled.
exempt_roles: Vec<Snowflake>The role IDs that should not be affected by the rule.
exempt_channels: Vec<Snowflake>The channel IDs that should not be affected by the rule.
Trait Implementations§
Source§impl Clone for AutoModRule
impl Clone for AutoModRule
Source§fn clone(&self) -> AutoModRule
fn clone(&self) -> AutoModRule
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AutoModRule
impl Debug for AutoModRule
Source§impl<'de> Deserialize<'de> for AutoModRule
impl<'de> Deserialize<'de> for AutoModRule
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AutoModRule, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AutoModRule, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for AutoModRule
impl Serialize for AutoModRule
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for AutoModRule
impl RefUnwindSafe for AutoModRule
impl Send for AutoModRule
impl Sync for AutoModRule
impl Unpin for AutoModRule
impl UnwindSafe for AutoModRule
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