serenity/model/guild/
guild_preview.rs

1use crate::model::guild::Emoji;
2use crate::model::id::GuildId;
3use crate::model::misc::ImageHash;
4use crate::model::sticker::Sticker;
5
6/// Preview [`Guild`] information.
7///
8/// [Discord docs](https://discord.com/developers/docs/resources/guild#guild-preview-object).
9///
10/// [`Guild`]: super::Guild
11#[derive(Clone, Debug, Deserialize, Serialize)]
12#[non_exhaustive]
13pub struct GuildPreview {
14    /// The guild Id.
15    pub id: GuildId,
16    /// The guild name.
17    pub name: String,
18    /// The guild icon hash if it has one.
19    pub icon: Option<ImageHash>,
20    /// The guild splash hash if it has one.
21    pub splash: Option<ImageHash>,
22    /// The guild discovery splash hash it it has one.
23    pub discovery_splash: Option<ImageHash>,
24    /// The custom guild emojis.
25    pub emojis: Vec<Emoji>,
26    /// The guild features. See [`Guild::features`]
27    ///
28    /// [`Guild::features`]: super::Guild::features
29    pub features: Vec<String>,
30    /// Approximate number of members in this guild.
31    pub approximate_member_count: u64,
32    /// Approximate number of online members in this guild.
33    pub approximate_presence_count: u64,
34    /// The description for the guild, if the guild has the `DISCOVERABLE` feature.
35    pub description: Option<String>,
36    /// Custom guild stickers.
37    pub stickers: Vec<Sticker>,
38}