1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
use crate::{ guild::{ DefaultMessageNotificationLevel, Emoji, ExplicitContentFilter, MfaLevel, Permissions, PremiumTier, Role, SystemChannelFlags, VerificationLevel, }, id::{ApplicationId, ChannelId, EmojiId, GuildId, RoleId, UserId}, }; use serde::{Deserialize, Serialize}; use std::collections::HashMap; #[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)] pub struct PartialGuild { 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 embed_channel_id: Option<ChannelId>, #[serde(default)] pub embed_enabled: bool, #[serde(with = "serde_mappable_seq")] pub emojis: HashMap<EmojiId, Emoji>, pub explicit_content_filter: ExplicitContentFilter, pub features: Vec<String>, pub icon: Option<String>, pub max_members: Option<u64>, pub max_presences: Option<u64>, pub member_count: Option<u64>, pub mfa_level: MfaLevel, pub name: String, pub owner_id: UserId, pub owner: Option<bool>, pub permissions: Option<Permissions>, pub preferred_locale: String, pub premium_subscription_count: Option<u64>, pub premium_tier: PremiumTier, pub region: String, #[serde(with = "serde_mappable_seq")] pub roles: HashMap<RoleId, Role>, pub rules_channel_id: Option<ChannelId>, pub splash: Option<String>, pub system_channel_flags: SystemChannelFlags, pub system_channel_id: Option<ChannelId>, pub verification_level: VerificationLevel, pub vanity_url_code: Option<String>, pub widget_channel_id: Option<ChannelId>, pub widget_enabled: Option<bool>, }