Struct serenity::builder::EditMember
source · [−]builder
only.Expand description
A builder which edits the properties of a Member
, to be used in
conjunction with Member::edit
.
Tuple Fields
0: HashMap<&'static str, Value>
Implementations
sourceimpl EditMember
impl EditMember
sourcepub fn deafen(&mut self, deafen: bool) -> &mut Self
pub fn deafen(&mut self, deafen: bool) -> &mut Self
Whether to deafen the member.
Requires the Deafen Members permission.
sourcepub fn mute(&mut self, mute: bool) -> &mut Self
pub fn mute(&mut self, mute: bool) -> &mut Self
Whether to mute the member.
Requires the Mute Members permission.
sourcepub fn nickname<S: ToString>(&mut self, nickname: S) -> &mut Self
pub fn nickname<S: ToString>(&mut self, nickname: S) -> &mut Self
Changes the member’s nickname. Pass an empty string to reset the nickname.
Requires the Manage Nicknames permission.
sourcepub fn roles<T: AsRef<RoleId>, It: IntoIterator<Item = T>>(
&mut self,
roles: It
) -> &mut Self
pub fn roles<T: AsRef<RoleId>, It: IntoIterator<Item = T>>(
&mut self,
roles: It
) -> &mut Self
Set the list of roles that the member should have.
Requires the Manage Roles permission to modify.
sourcepub fn voice_channel<C: Into<ChannelId>>(&mut self, channel_id: C) -> &mut Self
pub fn voice_channel<C: Into<ChannelId>>(&mut self, channel_id: C) -> &mut Self
The Id of the voice channel to move the member to.
Requires the Move Members permission.
sourcepub fn disconnect_member(&mut self) -> &mut Self
pub fn disconnect_member(&mut self) -> &mut Self
Disconnects the user from their voice channel if any
Requires the Move Members permission.
sourcepub fn disable_communication_until(&mut self, time: String) -> &mut Self
pub fn disable_communication_until(&mut self, time: String) -> &mut Self
Times the user out until time
, an ISO8601-formatted datetime string.
time
is considered invalid if it is not a valid ISO8601 timestamp or if it is greater
than 28 days from the current time.
Requires the Moderate Members permission.
sourcepub fn disable_communication_until_datetime(
&mut self,
time: Timestamp
) -> &mut Self
pub fn disable_communication_until_datetime(
&mut self,
time: Timestamp
) -> &mut Self
Times the user out until time
.
time
is considered invalid if it is greater than 28 days from the current time.
Requires the Moderate Members permission.
sourcepub fn enable_communication(&mut self) -> &mut Self
pub fn enable_communication(&mut self) -> &mut Self
Allow a user to communicate, removing their timeout, if there is one.
Requires the Moderate Members permission.
Trait Implementations
sourceimpl Clone for EditMember
impl Clone for EditMember
sourcefn clone(&self) -> EditMember
fn clone(&self) -> EditMember
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for EditMember
impl Debug for EditMember
sourceimpl Default for EditMember
impl Default for EditMember
sourcefn default() -> EditMember
fn default() -> EditMember
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for EditMember
impl Send for EditMember
impl Sync for EditMember
impl Unpin for EditMember
impl UnwindSafe for EditMember
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more