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 fn channel_id(self, channel_id: Option<Id<ChannelMarker>>) -> Self
pub 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 fn deaf(self, deaf: bool) -> Self
pub fn deaf(self, deaf: bool) -> Self
If true, restrict the member’s ability to hear sound from a voice channel.
sourcepub fn mute(self, mute: bool) -> Self
pub fn mute(self, mute: bool) -> Self
If true, restrict the member’s ability to speak in a voice channel.
sourcepub fn roles(self, roles: &'a [Id<RoleMarker>]) -> Self
pub fn roles(self, roles: &'a [Id<RoleMarker>]) -> Self
Set the new list of roles for a member.