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: boolWhether the rule is enabled.
event_type: AutoModerationEventTypeRule 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: StringName of the rule.
trigger_metadata: AutoModerationTriggerMetadataRule trigger metadata.
trigger_type: AutoModerationTriggerTypeRule trigger type.
Trait Implementations
sourceimpl Clone for AutoModerationRule
impl Clone for AutoModerationRule
sourcefn clone(&self) -> AutoModerationRule
fn clone(&self) -> AutoModerationRule
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for AutoModerationRule
impl Debug for AutoModerationRule
sourceimpl<'de> Deserialize<'de> for AutoModerationRule
impl<'de> Deserialize<'de> for AutoModerationRule
sourcefn 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
sourceimpl Hash for AutoModerationRule
impl Hash for AutoModerationRule
sourceimpl PartialEq<AutoModerationRule> for AutoModerationRule
impl PartialEq<AutoModerationRule> for AutoModerationRule
sourcefn eq(&self, other: &AutoModerationRule) -> bool
fn eq(&self, other: &AutoModerationRule) -> bool
sourceimpl Serialize for AutoModerationRule
impl Serialize for AutoModerationRule
impl Eq for AutoModerationRule
impl StructuralEq for AutoModerationRule
impl StructuralPartialEq for AutoModerationRule
Auto Trait Implementations
impl RefUnwindSafe for AutoModerationRule
impl Send for AutoModerationRule
impl Sync for AutoModerationRule
impl Unpin for AutoModerationRule
impl UnwindSafe for AutoModerationRule
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more