pub struct CachedGuild { /* private fields */ }
Expand description

Represents a cached Guild.

Implementations§

source§

impl CachedGuild

source

pub const fn afk_channel_id(&self) -> Option<Id<ChannelMarker>>

ID of the AFK channel.

source

pub const fn afk_timeout(&self) -> AfkTimeout

AFK timeout in seconds.

source

pub const fn application_id(&self) -> Option<Id<ApplicationMarker>>

For bot created guilds, the ID of the creating application.

source

pub const fn banner(&self) -> Option<&ImageHash>

source

pub const fn default_message_notifications(
&self
) -> DefaultMessageNotificationLevel

Default message notification level.

source

pub fn description(&self) -> Option<&str>

For Community guilds, the description.

source

pub const fn discovery_splash(&self) -> Option<&ImageHash>

For discoverable guilds, the discovery splash hash.

See Discord Docs/Image Formatting.

source

pub const fn explicit_content_filter(&self) -> ExplicitContentFilter

Explicit content filter level.

source

pub fn features(&self) -> Features<'_>

Enabled guild features.

source

pub const fn icon(&self) -> Option<&ImageHash>

source

pub const fn id(&self) -> Id<GuildMarker>

ID of the guild.

source

pub const fn joined_at(&self) -> Option<Timestamp>

Timestamp of the user’s join date.

source

pub const fn large(&self) -> bool

Whether this guild is “large”.

source

pub const fn max_members(&self) -> Option<u64>

Maximum members.

source

pub const fn max_presences(&self) -> Option<u64>

Maximum presences.

source

pub const fn max_video_channel_users(&self) -> Option<u64>

Maximum number of users in a video channel.

source

pub const fn member_count(&self) -> Option<u64>

Total number of members in the guild.

source

pub const fn mfa_level(&self) -> MfaLevel

Required MFA level.

source

pub fn name(&self) -> &str

Name of the guild.

source

pub const fn nsfw_level(&self) -> NSFWLevel

NSFW level.

source

pub const fn owner(&self) -> Option<bool>

Whether the current user is the owner of the guild.

source

pub const fn owner_id(&self) -> Id<UserMarker>

ID of the guild’s owner.

source

pub const fn permissions(&self) -> Option<Permissions>

Total permissions for the current user in the guild, excluding overwrites.

source

pub fn preferred_locale(&self) -> &str

Preferred locale for Community guilds.

Used in server discovery and notices from Discord. Defaults to “en-US”.

source

pub const fn premium_progress_bar_enabled(&self) -> bool

Whether the premium progress bar is enabled.

source

pub const fn premium_subscription_count(&self) -> Option<u64>

Number of boosts this guild currently has.

source

pub const fn premium_tier(&self) -> PremiumTier

Server boost level.

source

pub const fn public_updates_channel_id(&self) -> Option<Id<ChannelMarker>>

ID of the where moderators of Community guilds receive notices from Discord.

source

pub const fn rules_channel_id(&self) -> Option<Id<ChannelMarker>>

For Community guilds, the ID of the rules channel.

source

pub const fn splash(&self) -> Option<&ImageHash>

source

pub const fn system_channel_id(&self) -> Option<Id<ChannelMarker>>

ID of the channel where notices are posted.

Example notices include welcome messages and boost events.

source

pub const fn system_channel_flags(&self) -> SystemChannelFlags

System channel flags.

source

pub const fn unavailable(&self) -> bool

Whether the guild is unavailable due to an outage.

source

pub fn vanity_url_code(&self) -> Option<&str>

Vanity URL code.

source

pub const fn verification_level(&self) -> VerificationLevel

Required verification level.

source

pub const fn widget_channel_id(&self) -> Option<Id<ChannelMarker>>

ID of the channel that a widget generates an invite to.

source

pub const fn widget_enabled(&self) -> Option<bool>

Whether the widget is enabled.

Trait Implementations§

source§

impl Clone for CachedGuild

source§

fn clone(&self) -> CachedGuild

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 CachedGuild

source§

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

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

impl PartialEq<CachedGuild> for CachedGuild

source§

fn eq(&self, other: &CachedGuild) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CachedGuild

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
source§

impl Eq for CachedGuild

source§

impl StructuralEq for CachedGuild

source§

impl StructuralPartialEq for CachedGuild

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,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · 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>,

const: unstable · 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.
const: unstable · 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.
const: unstable · 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