#[non_exhaustive]pub struct GuildMemberUpdate {Show 15 fields
pub guild_id: GuildId,
pub roles: Vec<RoleId>,
pub user: User,
pub nick: Option<CompactString>,
pub avatar: Option<ImageHash>,
pub banner: Option<ImageHash>,
pub joined_at: Option<Timestamp>,
pub premium_since: Option<Timestamp>,
pub deaf: Option<bool>,
pub mute: Option<bool>,
pub pending: Option<bool>,
pub communication_disabled_until: Option<Timestamp>,
pub flags: Option<MemberFlags>,
pub avatar_decoration_data: Option<Box<AvatarDecorationData>>,
pub collectibles: Option<Box<Collectibles>>,
}Expand description
The data of the Guild Member Update
dispatch event: a member or their user changed (requires the GUILD_MEMBERS intent).
Optional fields that were not sent are None.
discord.js counterpart: the GuildMemberUpdate event.
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.guild_id: GuildIdThe guild.
roles: Vec<RoleId>The member’s roles.
user: UserThe member’s user.
nick: Option<CompactString>The nickname.
avatar: Option<ImageHash>The guild avatar hash.
The guild banner hash.
joined_at: Option<Timestamp>When the user joined (None for some guest members).
When the member started boosting.
deaf: Option<bool>Whether the member is server-deafened.
mute: Option<bool>Whether the member is server-muted.
pending: Option<bool>Whether the member has not passed membership screening yet.
communication_disabled_until: Option<Timestamp>When the member’s timeout ends.
flags: Option<MemberFlags>The member’s flags.
avatar_decoration_data: Option<Box<AvatarDecorationData>>The guild avatar decoration.
collectibles: Option<Box<Collectibles>>The guild collectibles.
Trait Implementations§
Source§impl Clone for GuildMemberUpdate
impl Clone for GuildMemberUpdate
Source§impl Debug for GuildMemberUpdate
impl Debug for GuildMemberUpdate
Source§impl<'de> Deserialize<'de> for GuildMemberUpdate
impl<'de> Deserialize<'de> for GuildMemberUpdate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for GuildMemberUpdate
Source§impl PartialEq for GuildMemberUpdate
impl PartialEq for GuildMemberUpdate
Source§impl Serialize for GuildMemberUpdate
impl Serialize for GuildMemberUpdate
impl StructuralPartialEq for GuildMemberUpdate
Auto Trait Implementations§
impl Freeze for GuildMemberUpdate
impl RefUnwindSafe for GuildMemberUpdate
impl Send for GuildMemberUpdate
impl Sync for GuildMemberUpdate
impl Unpin for GuildMemberUpdate
impl UnsafeUnpin for GuildMemberUpdate
impl UnwindSafe for GuildMemberUpdate
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