Struct twilight_cache_inmemory::model::CachedGuild[][src]

pub struct CachedGuild {
Show 34 fields pub id: GuildId, pub afk_channel_id: Option<ChannelId>, pub afk_timeout: u64, pub application_id: Option<ApplicationId>, pub banner: Option<String>, pub default_message_notifications: DefaultMessageNotificationLevel, pub description: Option<String>, pub discovery_splash: Option<String>, pub explicit_content_filter: ExplicitContentFilter, pub features: Vec<String>, pub icon: Option<String>, pub joined_at: Option<String>, pub large: bool, pub max_members: Option<u64>, pub max_presences: Option<u64>, pub member_count: Option<u64>, pub mfa_level: MfaLevel, pub name: String, pub nsfw_level: NSFWLevel, pub owner: Option<bool>, pub owner_id: UserId, pub permissions: Option<Permissions>, pub preferred_locale: String, pub premium_subscription_count: Option<u64>, pub premium_tier: PremiumTier, pub rules_channel_id: Option<ChannelId>, pub splash: Option<String>, pub system_channel_id: Option<ChannelId>, pub system_channel_flags: SystemChannelFlags, pub unavailable: bool, pub verification_level: VerificationLevel, pub vanity_url_code: Option<String>, pub widget_channel_id: Option<ChannelId>, pub widget_enabled: Option<bool>,
}
Expand description

Represents a cached Guild.

Fields

id: GuildId

ID of the guild.

afk_channel_id: Option<ChannelId>

ID of the AFK channel.

afk_timeout: u64

AFK timeout in seconds.

application_id: Option<ApplicationId>

For bot created guilds, the ID of the creating application.

banner: Option<String>default_message_notifications: DefaultMessageNotificationLevel

Default message notification level.

description: Option<String>

For Community guilds, the description.

discovery_splash: Option<String>

For discoverable guilds, the discovery splash hash.

See Discord Docs/Image Formatting.

explicit_content_filter: ExplicitContentFilter

Explicit content filter level.

features: Vec<String>

Enabled guild features.

icon: Option<String>joined_at: Option<String>

ISO 8601 timestamp of the user’s join date.

large: bool

Whether this guild is “large”.

max_members: Option<u64>

Maximum members.

max_presences: Option<u64>

Maximum presences.

member_count: Option<u64>

Total number of members in the guild.

mfa_level: MfaLevel

Required MFA level.

name: String

Name of the guild.

nsfw_level: NSFWLevel

NSFW level.

owner: Option<bool>

Whether the current user is the owner of the guild.

owner_id: UserId

ID of the guild’s owner.

permissions: Option<Permissions>

Total permissions for the current user in the guild, excluding overwrites.

preferred_locale: String

Preferred locale for Community guilds.

Used in server discovery and notices from Discord. Defaults to “en-US”.

premium_subscription_count: Option<u64>

Number of boosts this guild currently has.

premium_tier: PremiumTier

Server boost level.

rules_channel_id: Option<ChannelId>

For Community guilds, the ID of the rules channel.

splash: Option<String>system_channel_id: Option<ChannelId>

ID of the channel where notices are posted.

Example notices include welcome messages and boost events.

system_channel_flags: SystemChannelFlags

System channel flags.

unavailable: bool

Whether the guild is unavailable due to an outage.

verification_level: VerificationLevel

Vanity URL code.

vanity_url_code: Option<String>

ID of the channel that a widget generates an invite to.

widget_channel_id: Option<ChannelId>

Required verification level.

widget_enabled: Option<bool>

Whether the widget is enabled.

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

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

Performs the conversion.

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

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.