pub struct PartialGuild {
Show 36 fields pub application_id: Option<ApplicationId>, pub id: GuildId, pub afk_channel_id: Option<ChannelId>, pub afk_timeout: u64, pub default_message_notifications: DefaultMessageNotificationLevel, pub widget_enabled: Option<bool>, pub widget_channel_id: Option<ChannelId>, pub emojis: HashMap<EmojiId, Emoji, RandomState>, pub features: Vec<String, Global>, pub icon: Option<String>, pub mfa_level: MfaLevel, pub name: String, pub owner_id: UserId, pub owner: bool, pub roles: HashMap<RoleId, Role, RandomState>, pub splash: Option<String>, pub discovery_splash: Option<String>, pub system_channel_id: Option<ChannelId>, pub system_channel_flags: SystemChannelFlags, pub rules_channel_id: Option<ChannelId>, pub public_updates_channel_id: Option<ChannelId>, pub verification_level: VerificationLevel, pub description: Option<String>, pub premium_tier: PremiumTier, pub premium_subscription_count: u64, pub banner: Option<String>, pub vanity_url_code: Option<String>, pub welcome_screen: Option<GuildWelcomeScreen>, pub approximate_member_count: Option<u64>, pub approximate_presence_count: Option<u64>, pub nsfw_level: NsfwLevel, pub max_video_channel_users: Option<u64>, pub max_presences: Option<u64>, pub max_members: Option<u64>, pub permissions: Option<String>, pub stickers: HashMap<StickerId, Sticker, RandomState>,
}
Expand description

Partial information about a Guild. This does not include information like member data.

Discord docs.

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.
§application_id: Option<ApplicationId>

Application ID of the guild creator if it is bot-created.

§id: GuildId

The unique Id identifying the guild.

This is equivalent to the Id of the default role (@everyone).

§afk_channel_id: Option<ChannelId>

Id of a voice channel that’s considered the AFK channel.

§afk_timeout: u64

The amount of seconds a user can not show any activity in a voice channel before being moved to an AFK channel – if one exists.

§default_message_notifications: DefaultMessageNotificationLevel

Indicator of whether notifications for all messages are enabled by default in the guild.

§widget_enabled: Option<bool>

Whether or not the guild widget is enabled.

§widget_channel_id: Option<ChannelId>

The channel id that the widget will generate an invite to, or null if set to no invite

§emojis: HashMap<EmojiId, Emoji, RandomState>

All of the guild’s custom emojis.

§features: Vec<String, Global>

Features enabled for the guild.

Refer to Guild::features for more information.

§icon: Option<String>

The hash of the icon used by the guild.

In the client, this appears on the guild list on the left-hand side.

§mfa_level: MfaLevel

Indicator of whether the guild requires multi-factor authentication for Roles or Users with moderation permissions.

§name: String

The name of the guild.

§owner_id: UserId

The Id of the User who owns the guild.

§owner: bool

Whether or not the user is the owner of the guild.

§roles: HashMap<RoleId, Role, RandomState>

A mapping of the guild’s roles.

§splash: Option<String>

An identifying hash of the guild’s splash icon.

If the InviteSplash feature is enabled, this can be used to generate a URL to a splash image.

§discovery_splash: Option<String>

An identifying hash of the guild discovery’s splash icon.

Note: Only present for guilds with the DISCOVERABLE feature.

§system_channel_id: Option<ChannelId>

The ID of the channel to which system messages are sent.

§system_channel_flags: SystemChannelFlags

System channel flags.

§rules_channel_id: Option<ChannelId>

The id of the channel where rules and/or guidelines are displayed.

Note: Only available on COMMUNITY guild, see Self::features.

§public_updates_channel_id: Option<ChannelId>

The id of the channel where admins and moderators of Community guilds receive notices from Discord.

Note: Only available on COMMUNITY guild, see Self::features.

§verification_level: VerificationLevel

Indicator of the current verification level of the guild.

§description: Option<String>

The guild’s description, if it has one.

§premium_tier: PremiumTier

The server’s premium boosting level.

§premium_subscription_count: u64

The total number of users currently boosting this server.

§banner: Option<String>

The guild’s banner, if it has one.

§vanity_url_code: Option<String>

The vanity url code for the guild, if it has one.

§welcome_screen: Option<GuildWelcomeScreen>

The welcome screen of the guild.

Note: Only available on COMMUNITY guild, see Self::features.

§approximate_member_count: Option<u64>

Approximate number of members in this guild.

§approximate_presence_count: Option<u64>

Approximate number of non-offline members in this guild.

§nsfw_level: NsfwLevel

The guild NSFW state. See discord support article.

§max_video_channel_users: Option<u64>

The maximum amount of users in a video channel.

§max_presences: Option<u64>

The maximum number of presences for the guild. The default value is currently 25000.

Note: It is in effect when it is None.

§max_members: Option<u64>

The maximum number of members for the guild.

§permissions: Option<String>

The user permissions in the guild.

§stickers: HashMap<StickerId, Sticker, RandomState>

All of the guild’s custom stickers.

Trait Implementations§

source§

impl Clone for PartialGuild

source§

fn clone(&self) -> PartialGuild

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PartialGuild

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for PartialGuild

source§

fn deserialize<D>( deserializer: D ) -> Result<PartialGuild, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<'a> From<&'a PartialGuild> for GuildId

source§

fn from(guild: &PartialGuild) -> GuildId

Gets the Id of a partial guild.

source§

impl From<Guild> for PartialGuild

source§

fn from(guild: Guild) -> PartialGuild

Converts this Guild instance into a PartialGuild

PartialGuild is not a strict subset and contains some data specific to the current user that Guild does not contain. Therefore, this method needs access to cache and HTTP to generate the missing data

source§

impl From<PartialGuild> for GuildContainer

source§

fn from(guild: PartialGuild) -> GuildContainer

Converts to this type from the input type.
source§

impl From<PartialGuild> for GuildId

source§

fn from(guild: PartialGuild) -> GuildId

Gets the Id of a partial guild.

source§

impl Serialize for PartialGuild

source§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,