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> Freeze for UpdateAutoModerationRule<'a>
impl<'a> !RefUnwindSafe for UpdateAutoModerationRule<'a>
impl<'a> Send for UpdateAutoModerationRule<'a>
impl<'a> Sync for UpdateAutoModerationRule<'a>
impl<'a> Unpin for UpdateAutoModerationRule<'a>
impl<'a> !UnwindSafe for UpdateAutoModerationRule<'a>
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