#[non_exhaustive]pub struct CachedGuild {Show 44 fields
pub id: GuildId,
pub name: CompactString,
pub icon: Option<ImageHash>,
pub icon_hash: Option<ImageHash>,
pub splash: Option<ImageHash>,
pub discovery_splash: Option<ImageHash>,
pub owner: bool,
pub owner_id: UserId,
pub permissions: Option<Permissions>,
pub region: Option<CompactString>,
pub afk_channel_id: Option<ChannelId>,
pub afk_timeout: u32,
pub widget_enabled: bool,
pub widget_channel_id: Option<ChannelId>,
pub verification_level: VerificationLevel,
pub default_message_notifications: DefaultMessageNotificationLevel,
pub explicit_content_filter: ExplicitContentFilterLevel,
pub features: Vec<Feature>,
pub mfa_level: MfaLevel,
pub application_id: Option<ApplicationId>,
pub system_channel_id: Option<ChannelId>,
pub system_channel_flags: SystemChannelFlags,
pub rules_channel_id: Option<ChannelId>,
pub max_presences: Option<u32>,
pub max_members: Option<u32>,
pub vanity_url_code: Option<CompactString>,
pub description: Option<CompactString>,
pub banner: Option<ImageHash>,
pub premium_tier: PremiumTier,
pub premium_subscription_count: Option<u32>,
pub preferred_locale: Locale,
pub public_updates_channel_id: Option<ChannelId>,
pub max_video_channel_users: Option<u32>,
pub max_stage_video_channel_users: Option<u32>,
pub approximate_member_count: Option<u32>,
pub approximate_presence_count: Option<u32>,
pub welcome_screen: Option<Box<WelcomeScreen>>,
pub nsfw_level: AgeRestrictionLevel,
pub premium_progress_bar_enabled: bool,
pub safety_alerts_channel_id: Option<ChannelId>,
pub incidents_data: Option<Box<IncidentsData>>,
pub joined_at: Option<Timestamp>,
pub large: bool,
pub member_count: u32,
}Expand description
A cached guild: a [Guild] without its roles, emojis and stickers, which the cache keeps
in their own resources, plus what GUILD_CREATE adds.
Read the guild’s roles with Cache::roles, its emojis with
Cache::emojis, its stickers with
Cache::stickers and its channels with
CacheView::in_guild.
The fields mean the same as in [Guild]; see the
guild object.
discord.js counterpart: Guild.
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.id: GuildId§name: CompactString§icon: Option<ImageHash>§icon_hash: Option<ImageHash>§splash: Option<ImageHash>§discovery_splash: Option<ImageHash>§owner: bool§owner_id: UserId§permissions: Option<Permissions>§region: Option<CompactString>§afk_channel_id: Option<ChannelId>§afk_timeout: u32§widget_enabled: bool§widget_channel_id: Option<ChannelId>§verification_level: VerificationLevel§default_message_notifications: DefaultMessageNotificationLevel§explicit_content_filter: ExplicitContentFilterLevel§features: Vec<Feature>§mfa_level: MfaLevel§application_id: Option<ApplicationId>§system_channel_id: Option<ChannelId>§system_channel_flags: SystemChannelFlags§rules_channel_id: Option<ChannelId>§max_presences: Option<u32>§max_members: Option<u32>§vanity_url_code: Option<CompactString>§description: Option<CompactString>§preferred_locale: Locale§public_updates_channel_id: Option<ChannelId>§max_video_channel_users: Option<u32>§max_stage_video_channel_users: Option<u32>§approximate_member_count: Option<u32>§approximate_presence_count: Option<u32>§welcome_screen: Option<Box<WelcomeScreen>>§nsfw_level: AgeRestrictionLevel§safety_alerts_channel_id: Option<ChannelId>§incidents_data: Option<Box<IncidentsData>>§joined_at: Option<Timestamp>When the bot joined the guild (from GUILD_CREATE).
large: boolWhether the guild is large (more members than the identify large_threshold).
member_count: u32The number of members, from GUILD_CREATE, kept up to date by member joins and
leaves.
discord.js: Guild#memberCount.
Trait Implementations§
Source§impl Clone for CachedGuild
impl Clone for CachedGuild
Source§impl Debug for CachedGuild
impl Debug for CachedGuild
impl Eq for CachedGuild
Source§impl PartialEq for CachedGuild
impl PartialEq for CachedGuild
impl StructuralPartialEq for CachedGuild
Auto Trait Implementations§
impl Freeze for CachedGuild
impl RefUnwindSafe for CachedGuild
impl Send for CachedGuild
impl Sync for CachedGuild
impl Unpin for CachedGuild
impl UnsafeUnpin for CachedGuild
impl UnwindSafe for CachedGuild
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more