pub struct UpdateGuildMember<'a> { /* private fields */ }Expand description
Update a guild member.
All fields are optional. See Discord Docs/Modify Guild Member.
Implementations§
Source§impl<'a> UpdateGuildMember<'a>
impl<'a> UpdateGuildMember<'a>
Sourcepub const fn channel_id(self, channel_id: Option<Id<ChannelMarker>>) -> Self
pub const fn channel_id(self, channel_id: Option<Id<ChannelMarker>>) -> Self
Move the member to a different voice channel.
Sourcepub fn communication_disabled_until(self, timestamp: Option<Timestamp>) -> Self
pub fn communication_disabled_until(self, timestamp: Option<Timestamp>) -> Self
Set the member’s Guild Timeout.
The timestamp indicates when the user will be able to communicate again.
It can be up to 28 days in the future. Set to None to remove the
timeout. Requires the MODERATE_MEMBERS permission. If this is set,
and if the target member is an administrator or the owner of the guild,
the response status code will be 403.
§Errors
Returns an error of type CommunicationDisabledUntil if the expiry
timestamp is more than 28 days from the current time.
Sourcepub const fn deaf(self, deaf: bool) -> Self
pub const fn deaf(self, deaf: bool) -> Self
If true, restrict the member’s ability to hear sound from a voice channel.
Sourcepub const fn mute(self, mute: bool) -> Self
pub const fn mute(self, mute: bool) -> Self
If true, restrict the member’s ability to speak in a voice channel.
Trait Implementations§
Source§impl<'a> AuditLogReason<'a> for UpdateGuildMember<'a>
impl<'a> AuditLogReason<'a> for UpdateGuildMember<'a>
Source§impl IntoFuture for UpdateGuildMember<'_>
impl IntoFuture for UpdateGuildMember<'_>
Source§type Output = Result<Response<Member>, Error>
type Output = Result<Response<Member>, Error>
The output that the future will produce on completion.
Source§type IntoFuture = ResponseFuture<Member>
type IntoFuture = ResponseFuture<Member>
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 UpdateGuildMember<'_>
impl TryIntoRequest for UpdateGuildMember<'_>
Auto Trait Implementations§
impl<'a> Freeze for UpdateGuildMember<'a>
impl<'a> !RefUnwindSafe for UpdateGuildMember<'a>
impl<'a> Send for UpdateGuildMember<'a>
impl<'a> Sync for UpdateGuildMember<'a>
impl<'a> Unpin for UpdateGuildMember<'a>
impl<'a> !UnwindSafe for UpdateGuildMember<'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