Struct twilight_model::guild::auto_moderation::AutoModerationRule
source · pub struct AutoModerationRule {
pub actions: Vec<AutoModerationAction>,
pub creator_id: Id<UserMarker>,
pub enabled: bool,
pub event_type: AutoModerationEventType,
pub exempt_channels: Vec<Id<ChannelMarker>>,
pub exempt_roles: Vec<Id<RoleMarker>>,
pub guild_id: Id<GuildMarker>,
pub id: Id<AutoModerationRuleMarker>,
pub name: String,
pub trigger_metadata: AutoModerationTriggerMetadata,
pub trigger_type: AutoModerationTriggerType,
}
Expand description
Configured auto moderation rule.
Fields§
§actions: Vec<AutoModerationAction>
Actions which will execute when the rule is triggered.
creator_id: Id<UserMarker>
User which created the rule.
enabled: bool
Whether the rule is enabled.
event_type: AutoModerationEventType
Rule event type.
exempt_channels: Vec<Id<ChannelMarker>>
Channels that should not be affected by the rule.
Maximum of 50.
exempt_roles: Vec<Id<RoleMarker>>
Roles that should not be affected by the rule.
Maximum of 20.
guild_id: Id<GuildMarker>
ID of the guild the rule belongs to.
id: Id<AutoModerationRuleMarker>
ID of the rule.
name: String
Name of the rule.
trigger_metadata: AutoModerationTriggerMetadata
Rule trigger metadata.
trigger_type: AutoModerationTriggerType
Rule trigger type.
Trait Implementations§
source§impl Clone for AutoModerationRule
impl Clone for AutoModerationRule
source§fn clone(&self) -> AutoModerationRule
fn clone(&self) -> AutoModerationRule
Returns a copy 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 AutoModerationRule
impl Debug for AutoModerationRule
source§impl<'de> Deserialize<'de> for AutoModerationRule
impl<'de> Deserialize<'de> for AutoModerationRule
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
source§impl Hash for AutoModerationRule
impl Hash for AutoModerationRule
source§impl PartialEq<AutoModerationRule> for AutoModerationRule
impl PartialEq<AutoModerationRule> for AutoModerationRule
source§fn eq(&self, other: &AutoModerationRule) -> bool
fn eq(&self, other: &AutoModerationRule) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.