#[non_exhaustive]pub struct GuildMemberAdd {
pub guild_id: GuildId,
pub member: Member,
}Expand description
The data of the Guild Member Add
dispatch event (requires the GUILD_MEMBERS intent; may repeat for existing members).
discord.js counterpart: the GuildMemberAdd event.
Dereferences to the contained Member.
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.
member: MemberThe member.
Methods from Deref<Target = Member>§
Sourcepub fn display_name(&self) -> &str
pub fn display_name(&self) -> &str
Returns the name shown for the member in this guild: the nickname, else the user’s display name, else the username.
discord.js counterpart: GuildMember#displayName.
Sourcepub fn is_timed_out(&self, now: Timestamp) -> bool
pub fn is_timed_out(&self, now: Timestamp) -> bool
Returns whether the member is timed out at now.
discord.js counterpart: GuildMember#isCommunicationDisabled.
Trait Implementations§
Source§impl Clone for GuildMemberAdd
impl Clone for GuildMemberAdd
Source§impl Debug for GuildMemberAdd
impl Debug for GuildMemberAdd
Source§impl Deref for GuildMemberAdd
impl Deref for GuildMemberAdd
Source§impl DerefMut for GuildMemberAdd
impl DerefMut for GuildMemberAdd
Source§impl<'de> Deserialize<'de> for GuildMemberAdd
impl<'de> Deserialize<'de> for GuildMemberAdd
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for GuildMemberAdd
impl PartialEq for GuildMemberAdd
Source§impl Serialize for GuildMemberAdd
impl Serialize for GuildMemberAdd
impl StructuralPartialEq for GuildMemberAdd
Auto Trait Implementations§
impl Freeze for GuildMemberAdd
impl RefUnwindSafe for GuildMemberAdd
impl Send for GuildMemberAdd
impl Sync for GuildMemberAdd
impl Unpin for GuildMemberAdd
impl UnsafeUnpin for GuildMemberAdd
impl UnwindSafe for GuildMemberAdd
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