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 for AutoModerationRule
impl PartialEq for AutoModerationRule
source§impl Serialize for AutoModerationRule
impl Serialize for AutoModerationRule
impl Eq for AutoModerationRule
impl StructuralPartialEq for AutoModerationRule
Auto Trait Implementations§
impl Freeze for AutoModerationRule
impl RefUnwindSafe for AutoModerationRule
impl Send for AutoModerationRule
impl Sync for AutoModerationRule
impl Unpin for AutoModerationRule
impl UnwindSafe for AutoModerationRule
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)