pub struct AutoModerationTriggerMetadata {
pub allow_list: Option<Vec<String>>,
pub keyword_filter: Option<Vec<String>>,
pub presets: Option<Vec<AutoModerationKeywordPresetType>>,
pub mention_raid_protection_enabled: Option<bool>,
pub mention_total_limit: Option<u8>,
pub regex_patterns: Option<Vec<String>>,
}
Expand description
Additional data used to determine whether a rule should be triggered.
Different fields are relevant based on the value of AutoModerationRule::trigger_type
.
Fields§
§allow_list: Option<Vec<String>>
Substrings that will be exempt from triggering the preset type.
keyword_filter: Option<Vec<String>>
Substrings which will be searched for in content.
presets: Option<Vec<AutoModerationKeywordPresetType>>
Internally pre-defined wordsets which will be searched for in content.
A keyword can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each keyword will be matched. See Discord Docs/Keyword Matching Strategies.
mention_raid_protection_enabled: Option<bool>
Whether to automatically detect mention raids.
mention_total_limit: Option<u8>
Total number of unique role and user mentions allowed per message (Maximum of 50).
regex_patterns: Option<Vec<String>>
Regular expression patterns which will be matched against content (Maximum of 10). Only Rust flavored regex is supported. Each regex pattern must be 260 characters or less.
Trait Implementations§
source§impl Clone for AutoModerationTriggerMetadata
impl Clone for AutoModerationTriggerMetadata
source§fn clone(&self) -> AutoModerationTriggerMetadata
fn clone(&self) -> AutoModerationTriggerMetadata
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'de> Deserialize<'de> for AutoModerationTriggerMetadata
impl<'de> Deserialize<'de> for AutoModerationTriggerMetadata
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>,
source§impl Hash for AutoModerationTriggerMetadata
impl Hash for AutoModerationTriggerMetadata
source§impl PartialEq for AutoModerationTriggerMetadata
impl PartialEq for AutoModerationTriggerMetadata
source§fn eq(&self, other: &AutoModerationTriggerMetadata) -> bool
fn eq(&self, other: &AutoModerationTriggerMetadata) -> bool
self
and other
values to be equal, and is used by ==
.impl Eq for AutoModerationTriggerMetadata
impl StructuralPartialEq for AutoModerationTriggerMetadata
Auto Trait Implementations§
impl Freeze for AutoModerationTriggerMetadata
impl RefUnwindSafe for AutoModerationTriggerMetadata
impl Send for AutoModerationTriggerMetadata
impl Sync for AutoModerationTriggerMetadata
impl Unpin for AutoModerationTriggerMetadata
impl UnwindSafe for AutoModerationTriggerMetadata
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
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)
clone_to_uninit
)