pub struct CachedMember {
Show 22 fields pub guild_avatar: Option<ImageHash>, pub communication_disabled_until: Option<Timestamp>, pub deaf: bool, pub guild_id: Id<GuildMarker>, pub joined_at: Timestamp, pub mute: bool, pub nick: Option<String>, pub pending: bool, pub premium_since: Option<Timestamp>, pub accent_color: Option<u32>, pub avatar: Option<ImageHash>, pub banner: Option<ImageHash>, pub bot: bool, pub discriminator: u16, pub flags: Option<UserFlags>, pub id: Id<UserMarker>, pub locale: Option<String>, pub mfa_enabled: Option<bool>, pub name: String, pub premium_type: Option<PremiumType>, pub public_flags: Option<UserFlags>, pub system: Option<bool>,
}
Expand description

A cached member

It’s the same as twilight_model::guild::member::Member except:

  • user field is flattened and avatar field is renamed to guild_avatar since member users are rarely duplicates, making this struct easier to cache

  • roles field is removed, as member roles are cached separately

  • email and verified fields are removed, as they’re only sent in some HTTP endpoints

Fields

guild_avatar: Option<ImageHash>communication_disabled_until: Option<Timestamp>deaf: boolguild_id: Id<GuildMarker>joined_at: Timestampmute: boolnick: Option<String>pending: boolpremium_since: Option<Timestamp>accent_color: Option<u32>avatar: Option<ImageHash>banner: Option<ImageHash>bot: booldiscriminator: u16flags: Option<UserFlags>id: Id<UserMarker>locale: Option<String>mfa_enabled: Option<bool>name: Stringpremium_type: Option<PremiumType>public_flags: Option<UserFlags>system: Option<bool>

Implementations

Return whether the user is timed out

Warnings

Make sure the system time is correct

Errors

Returns an error if the member’s timestamp isn’t valid (a Twilight or Discord error)

Update the cached member with the partial member

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more