Struct Guild

Source
pub struct Guild {
Show 31 fields pub id: Snowflake, pub name: String, pub icon: Option<String>, pub splash: Option<String>, pub owner: Option<bool>, pub owner_id: String, pub permissions: i32, pub region: String, pub afk_channel_id: Option<String>, pub afk_timeout: Option<i32>, pub embed_enabled: bool, pub embed_channel_id: String, pub member_count: i32, pub features: Vec<String>, pub roles: Vec<Role>, pub emojis: Vec<Emoji>, pub explicit_content_filter: ExplicitContentFilter, pub application_id: Option<String>, pub verification_level: VerificationLevel, pub mfa_level: MfaLevel, pub system_channel_id: Option<String>, pub joined_at: String, pub large: bool, pub unavailable: bool, pub widget_enabled: bool, pub widget_channel_id: String, pub default_message_notifications: DefaultMessageNotifications, pub voice_states: Vec<VoiceState>, pub channels: Vec<Channel>, pub members: Vec<GuildMember>, pub presences: Option<Vec<Presence>>,
}
Expand description

A Discord Guild, commonly referred to as a “server”.

Fields§

§id: Snowflake

The snowflake ID of this guild.

§name: String

The name of the guild.

§icon: Option<String>

The guild’s icon hash. Will be a None value if one is not set.

§splash: Option<String>

The guild’s splash hash. Will be a None value if it does not exist.

§owner: Option<bool>

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

§owner_id: String

The ID of the guild owner.

§permissions: i32

The permissions that the user has in this guild.

§region: String

The region in which this guild is located.

§afk_channel_id: Option<String>

The AFK channel ID for this guild.

§afk_timeout: Option<i32>

The AFK channel timeout for this guild.

§embed_enabled: bool

Whether or not the guild can be embedded in a widget.

§embed_channel_id: String

The channel ID that an embed widget will be generated for.

§member_count: i32

The amount of members that are currently in this guild.

§features: Vec<String>

A list of features that this guild currently has.

§roles: Vec<Role>

A collection of roles that belong to this guild.

§emojis: Vec<Emoji>

A collection of emotes that belong to this guild.

§explicit_content_filter: ExplicitContentFilter

The explicit content filter level for this guild.

§application_id: Option<String>

The ID of the application which created the guild, if applicable.

§verification_level: VerificationLevel

The verification level, which determines which users can chat in a guild.

§mfa_level: MfaLevel

The MFA authentication level for this guild.

§system_channel_id: Option<String>

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

§joined_at: String

The time that this guild was joined.

§large: bool

Whether this guild is considered a large guild by Discord.

§unavailable: bool

Whether or not this guild is available.

§widget_enabled: bool

Whether or not the server widget is enabled.

§widget_channel_id: String

The ID of the guild’s widget channel, if one exists.

§default_message_notifications: DefaultMessageNotifications

The default message notification setting for this guild.

§voice_states: Vec<VoiceState>

A collection of guild voice states.

§channels: Vec<Channel>

A collection of channels in this guild.

§members: Vec<GuildMember>

A collection of members in this guild.

§presences: Option<Vec<Presence>>

A collection of presences in this guild.

Trait Implementations§

Source§

impl Clone for Guild

Source§

fn clone(&self) -> Guild

Returns a duplicate 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 Guild

Source§

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

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

impl<'de> Deserialize<'de> for Guild

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

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

impl Serialize for Guild

Source§

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

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Guild

§

impl RefUnwindSafe for Guild

§

impl Send for Guild

§

impl Sync for Guild

§

impl Unpin for Guild

§

impl UnwindSafe for Guild

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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 T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,