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