Struct twilight_http::request::guild::member::UpdateGuildMember
source · [−]pub struct UpdateGuildMember<'a> { /* private fields */ }
Expand description
Update a guild member.
All fields are optional. See Discord Docs/Modify Guild Member.
Implementations
sourceimpl<'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>
) -> Result<Self, ValidationError>
pub fn communication_disabled_until(
self,
timestamp: Option<Timestamp>
) -> Result<Self, ValidationError>
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.
sourcepub const fn roles(self, roles: &'a [Id<RoleMarker>]) -> Self
pub const fn roles(self, roles: &'a [Id<RoleMarker>]) -> Self
Set the new list of roles for a member.
sourcepub fn exec(self) -> ResponseFuture<MemberBody>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
pub fn exec(self) -> ResponseFuture<MemberBody>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
Execute the request, returning a future resolving to a Response
.