Struct serenity::builder::EditAutoModRule
source · [−]Available on crate feature
builder
only.Tuple Fields
0: HashMap<&'static str, Value>
Implementations
sourceimpl EditAutoModRule
impl EditAutoModRule
sourcepub fn event_type(&mut self, event_type: EventType) -> &mut Self
pub fn event_type(&mut self, event_type: EventType) -> &mut Self
Set the event context the rule should be checked.
sourcepub fn trigger(&mut self, trigger: Trigger) -> &mut Self
pub fn trigger(&mut self, trigger: Trigger) -> &mut Self
Set the type of content which can trigger the rule.
None: The trigger type can’t be edited after creation. Only its values.
sourcepub fn actions<I>(&mut self, actions: I) -> &mut Self where
I: IntoIterator<Item = Action>,
pub fn actions<I>(&mut self, actions: I) -> &mut Self where
I: IntoIterator<Item = Action>,
Set the actions which will execute when the rule is triggered.
sourcepub fn exempt_roles<I>(&mut self, roles: I) -> &mut Self where
I: IntoIterator<Item = RoleId>,
pub fn exempt_roles<I>(&mut self, roles: I) -> &mut Self where
I: IntoIterator<Item = RoleId>,
Set roles that should not be affected by the rule.
Maximum of 20.
sourcepub fn exempt_channels<I>(&mut self, channels: I) -> &mut Self where
I: IntoIterator<Item = ChannelId>,
pub fn exempt_channels<I>(&mut self, channels: I) -> &mut Self where
I: IntoIterator<Item = ChannelId>,
Set channels that should not be affected by the rule.
Maximum of 50.
Trait Implementations
sourceimpl Clone for EditAutoModRule
impl Clone for EditAutoModRule
sourcefn clone(&self) -> EditAutoModRule
fn clone(&self) -> EditAutoModRule
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 more
sourceimpl Debug for EditAutoModRule
impl Debug for EditAutoModRule
Auto Trait Implementations
impl RefUnwindSafe for EditAutoModRule
impl Send for EditAutoModRule
impl Sync for EditAutoModRule
impl Unpin for EditAutoModRule
impl UnwindSafe for EditAutoModRule
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more