pub struct UpdateAutoModerationRule<'a> { /* private fields */ }Expand description
Update an auto moderation rule in a guild.
Requires the MANAGE_GUILD permission.
Implementations§
Source§impl<'a> UpdateAutoModerationRule<'a>
impl<'a> UpdateAutoModerationRule<'a>
Sourcepub const fn actions(self, actions: &'a [AutoModerationAction]) -> Self
pub const fn actions(self, actions: &'a [AutoModerationAction]) -> Self
Set the list of actions.
Sourcepub const fn event_type(self, event_type: AutoModerationEventType) -> Self
pub const fn event_type(self, event_type: AutoModerationEventType) -> Self
Set the rule’s event type.
Sourcepub const fn exempt_channels(
self,
exempt_channels: &'a [Id<ChannelMarker>],
) -> Self
pub const fn exempt_channels( self, exempt_channels: &'a [Id<ChannelMarker>], ) -> Self
Set the channels where the rule does not apply.
Sourcepub const fn exempt_roles(self, exempt_roles: &'a [Id<RoleMarker>]) -> Self
pub const fn exempt_roles(self, exempt_roles: &'a [Id<RoleMarker>]) -> Self
Set the roles to which the rule does not apply.
Sourcepub const fn trigger_metadata(
self,
trigger_metadata: &'a AutoModerationTriggerMetadata,
) -> Self
pub const fn trigger_metadata( self, trigger_metadata: &'a AutoModerationTriggerMetadata, ) -> Self
Set the trigger metadata.
Care must be taken to set the correct metadata based on the rule’s type.
Trait Implementations§
Source§impl<'a> AuditLogReason<'a> for UpdateAutoModerationRule<'a>
impl<'a> AuditLogReason<'a> for UpdateAutoModerationRule<'a>
Source§impl IntoFuture for UpdateAutoModerationRule<'_>
impl IntoFuture for UpdateAutoModerationRule<'_>
Source§type Output = Result<Response<AutoModerationRule>, Error>
type Output = Result<Response<AutoModerationRule>, Error>
The output that the future will produce on completion.
Source§type IntoFuture = ResponseFuture<AutoModerationRule>
type IntoFuture = ResponseFuture<AutoModerationRule>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Source§impl TryIntoRequest for UpdateAutoModerationRule<'_>
impl TryIntoRequest for UpdateAutoModerationRule<'_>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for UpdateAutoModerationRule<'a>
impl<'a> !UnwindSafe for UpdateAutoModerationRule<'a>
impl<'a> Forget for UpdateAutoModerationRule<'a>
impl<'a> Freeze for UpdateAutoModerationRule<'a>where
PhantomData<fn(AutoModerationRuleMarker) -> AutoModerationRuleMarker>: Freeze,
NonZero<u64>: Freeze,
&'a [AutoModerationAction]: Freeze,
&'a [Id<ChannelMarker>]: Freeze,
&'a [Id<RoleMarker>]: Freeze,
&'a str: Freeze,
&'a AutoModerationTriggerMetadata: Freeze,
PhantomData<fn(GuildMarker) -> GuildMarker>: Freeze,
&'a Client: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
NonZero<i32>: Freeze,
&'static str: Freeze,
impl<'a> Move for UpdateAutoModerationRule<'a>
impl<'a> Send for UpdateAutoModerationRule<'a>
impl<'a> Sync for UpdateAutoModerationRule<'a>where
NonZero<u64>: Sync,
RawVecInner: Sync,
BoxRaw<[Pos]>: Sync,
Bytes: Sync,
Arc<Config>: Sync,
Arc<Resolver<GenericConnector<TokioRuntimeProvider>>>: Sync,
Arc<ClientConfig>: Sync,
Arc<dyn ResolveServerName + Send + Sync>: Sync,
Arc<dyn Executor<Pin<Box<dyn Future<Output = ()> + Send>>> + Send + Sync>: Sync,
Arc<dyn Timer + Send + Sync>: Sync,
Arc<Mutex<PoolInner<PoolClient<Full<Bytes>>, (Scheme, Authority)>>>: Sync,
BoxRaw<str>: Sync,
Arc<Chan<(Message, Option<Box<dyn FnOnce(Option<Bucket>) -> bool + Send>>), Semaphore>>: Sync,
Arc<Atomic<bool>>: Sync,
NonZero<i32>: Sync,
impl<'a> Unpin for UpdateAutoModerationRule<'a>
impl<'a> UnsafeUnpin for UpdateAutoModerationRule<'a>where
PhantomData<fn(AutoModerationRuleMarker) -> AutoModerationRuleMarker>: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
&'a [AutoModerationAction]: UnsafeUnpin,
&'a [Id<ChannelMarker>]: UnsafeUnpin,
&'a [Id<RoleMarker>]: UnsafeUnpin,
&'a str: UnsafeUnpin,
&'a AutoModerationTriggerMetadata: UnsafeUnpin,
PhantomData<fn(GuildMarker) -> GuildMarker>: UnsafeUnpin,
&'a Client: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
NonZeroI32Inner: UnsafeUnpin,
&'static str: UnsafeUnpin,
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