#[non_exhaustive]pub struct AddGuildMember {
pub access_token: String,
pub nick: Option<CompactString>,
pub roles: Vec<RoleId>,
pub mute: Option<bool>,
pub deaf: Option<bool>,
}Expand description
The body of Add Guild Member.
The access token is redacted in the Debug output.
discord.js counterpart: RESTPutAPIGuildMemberJSONBody (discord-api-types).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.access_token: StringThe OAuth2 access token of the user, granted to the bot’s application with the
guilds.join scope.
nick: Option<CompactString>The nickname (needs MANAGE_NICKNAMES).
roles: Vec<RoleId>The roles (needs MANAGE_ROLES).
mute: Option<bool>Whether the member is muted in voice channels (needs MUTE_MEMBERS).
deaf: Option<bool>Whether the member is deafened in voice channels (needs DEAFEN_MEMBERS).
Implementations§
Trait Implementations§
Source§impl Clone for AddGuildMember
impl Clone for AddGuildMember
Source§impl Debug for AddGuildMember
impl Debug for AddGuildMember
impl Eq for AddGuildMember
Source§impl Hash for AddGuildMember
impl Hash for AddGuildMember
Source§impl PartialEq for AddGuildMember
impl PartialEq for AddGuildMember
Source§impl Serialize for AddGuildMember
impl Serialize for AddGuildMember
impl StructuralPartialEq for AddGuildMember
Auto Trait Implementations§
impl Freeze for AddGuildMember
impl RefUnwindSafe for AddGuildMember
impl Send for AddGuildMember
impl Sync for AddGuildMember
impl Unpin for AddGuildMember
impl UnsafeUnpin for AddGuildMember
impl UnwindSafe for AddGuildMember
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