pub struct CachedGuild { /* private fields */ }Expand description
Represents a cached Guild.
Implementations§
Source§impl CachedGuild
impl CachedGuild
Sourcepub const fn afk_channel_id(&self) -> Option<Id<ChannelMarker>>
pub const fn afk_channel_id(&self) -> Option<Id<ChannelMarker>>
ID of the AFK channel.
Sourcepub const fn afk_timeout(&self) -> AfkTimeout
pub const fn afk_timeout(&self) -> AfkTimeout
AFK timeout in seconds.
Sourcepub const fn application_id(&self) -> Option<Id<ApplicationMarker>>
pub const fn application_id(&self) -> Option<Id<ApplicationMarker>>
For bot created guilds, the ID of the creating application.
Banner hash.
Sourcepub const fn default_message_notifications(
&self,
) -> DefaultMessageNotificationLevel
pub const fn default_message_notifications( &self, ) -> DefaultMessageNotificationLevel
Default message notification level.
Sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
For Community guilds, the description.
Sourcepub const fn discovery_splash(&self) -> Option<&ImageHash>
pub const fn discovery_splash(&self) -> Option<&ImageHash>
For discoverable guilds, the discovery splash hash.
Sourcepub const fn explicit_content_filter(&self) -> ExplicitContentFilter
pub const fn explicit_content_filter(&self) -> ExplicitContentFilter
Explicit content filter level.
Sourcepub fn features(&self) -> Features<'_>
pub fn features(&self) -> Features<'_>
Enabled guild features.
Sourcepub fn guild_scheduled_events(&self) -> &[GuildScheduledEvent]
pub fn guild_scheduled_events(&self) -> &[GuildScheduledEvent]
Scheduled guild events.
Sourcepub const fn max_members(&self) -> Option<u64>
pub const fn max_members(&self) -> Option<u64>
Maximum members.
Sourcepub const fn max_presences(&self) -> Option<u64>
pub const fn max_presences(&self) -> Option<u64>
Maximum presences.
Sourcepub const fn max_stage_video_channel_users(&self) -> Option<u64>
pub const fn max_stage_video_channel_users(&self) -> Option<u64>
Maximum number of users in a stage video channel.
Sourcepub const fn max_video_channel_users(&self) -> Option<u64>
pub const fn max_video_channel_users(&self) -> Option<u64>
Maximum number of users in a video channel.
Sourcepub const fn member_count(&self) -> Option<u64>
pub const fn member_count(&self) -> Option<u64>
Total number of members in the guild.
Sourcepub const fn nsfw_level(&self) -> NSFWLevel
pub const fn nsfw_level(&self) -> NSFWLevel
NSFW level.
Sourcepub const fn permissions(&self) -> Option<Permissions>
pub const fn permissions(&self) -> Option<Permissions>
Total permissions for the current user in the guild, excluding overwrites.
Sourcepub fn preferred_locale(&self) -> &str
pub fn preferred_locale(&self) -> &str
Preferred locale for Community guilds.
Used in server discovery and notices from Discord. Defaults to “en-US”.
Whether the premium progress bar is enabled.
Number of boosts this guild currently has.
Server boost level.
Sourcepub const fn public_updates_channel_id(&self) -> Option<Id<ChannelMarker>>
pub const fn public_updates_channel_id(&self) -> Option<Id<ChannelMarker>>
ID of the where moderators of Community guilds receive notices from Discord.
Sourcepub const fn rules_channel_id(&self) -> Option<Id<ChannelMarker>>
pub const fn rules_channel_id(&self) -> Option<Id<ChannelMarker>>
For Community guilds, the ID of the rules channel.
Sourcepub const fn safety_alerts_channel_id(&self) -> Option<Id<ChannelMarker>>
pub const fn safety_alerts_channel_id(&self) -> Option<Id<ChannelMarker>>
The ID of the channel where admins and moderators of Community guilds receive safety alerts from Discord.
Sourcepub const fn system_channel_id(&self) -> Option<Id<ChannelMarker>>
pub const fn system_channel_id(&self) -> Option<Id<ChannelMarker>>
ID of the channel where notices are posted.
Example notices include welcome messages and boost events.
Sourcepub const fn system_channel_flags(&self) -> SystemChannelFlags
pub const fn system_channel_flags(&self) -> SystemChannelFlags
System channel flags.
Whether the guild is unavailable due to an outage.
Sourcepub fn vanity_url_code(&self) -> Option<&str>
pub fn vanity_url_code(&self) -> Option<&str>
Vanity URL code.
Sourcepub const fn verification_level(&self) -> VerificationLevel
pub const fn verification_level(&self) -> VerificationLevel
Required verification level.
Sourcepub const fn widget_channel_id(&self) -> Option<Id<ChannelMarker>>
pub const fn widget_channel_id(&self) -> Option<Id<ChannelMarker>>
ID of the channel that a widget generates an invite to.
Sourcepub const fn widget_enabled(&self) -> Option<bool>
pub const fn widget_enabled(&self) -> Option<bool>
Whether the widget is enabled.
Trait Implementations§
Source§impl CacheableGuild for CachedGuild
impl CacheableGuild for CachedGuild
Source§fn owner_id(&self) -> Id<UserMarker>
fn owner_id(&self) -> Id<UserMarker>
permission-calculator only.Source§fn update_with_guild_update(&mut self, guild_update: &GuildUpdate)
fn update_with_guild_update(&mut self, guild_update: &GuildUpdate)
GuildUpdate] event. Fields containing other
cached structures such as channels are cleared prior.Source§fn increase_member_count(&mut self, amount: u64)
fn increase_member_count(&mut self, amount: u64)
Source§fn decrease_member_count(&mut self, amount: u64)
fn decrease_member_count(&mut self, amount: u64)
Source§impl Clone for CachedGuild
impl Clone for CachedGuild
Source§fn clone(&self) -> CachedGuild
fn clone(&self) -> CachedGuild
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more