Struct discord_flows::model::guild::PartialGuild
source · 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.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
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: GuildIdThe 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: u64The 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: DefaultMessageNotificationLevelIndicator 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: MfaLevelIndicator of whether the guild requires multi-factor authentication for
Roles or Users with moderation permissions.
name: StringThe name of the guild.
owner_id: UserIdThe Id of the User who owns the guild.
owner: boolWhether 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: SystemChannelFlagsSystem 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: VerificationLevelIndicator of the current verification level of the guild.
description: Option<String>The guild’s description, if it has one.
The server’s premium boosting level.
The total number of users currently boosting this server.
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: NsfwLevelThe 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
impl Clone for PartialGuild
source§fn clone(&self) -> PartialGuild
fn clone(&self) -> PartialGuild
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for PartialGuild
impl Debug for PartialGuild
source§impl<'de> Deserialize<'de> for PartialGuild
impl<'de> Deserialize<'de> for PartialGuild
source§fn deserialize<D>(
deserializer: D
) -> Result<PartialGuild, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>( deserializer: D ) -> Result<PartialGuild, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
source§impl<'a> From<&'a PartialGuild> for GuildId
impl<'a> From<&'a PartialGuild> for GuildId
source§fn from(guild: &PartialGuild) -> GuildId
fn from(guild: &PartialGuild) -> GuildId
Gets the Id of a partial guild.
source§impl From<Guild> for PartialGuild
impl From<Guild> for PartialGuild
source§fn from(guild: Guild) -> PartialGuild
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
impl From<PartialGuild> for GuildContainer
source§fn from(guild: PartialGuild) -> GuildContainer
fn from(guild: PartialGuild) -> GuildContainer
source§impl From<PartialGuild> for GuildId
impl From<PartialGuild> for GuildId
source§fn from(guild: PartialGuild) -> GuildId
fn from(guild: PartialGuild) -> GuildId
Gets the Id of a partial guild.