Skip to main content

ModifyGuild

Struct ModifyGuild 

Source
#[non_exhaustive]
pub struct ModifyGuild {
Show 19 fields pub name: Option<CompactString>, pub verification_level: Patch<VerificationLevel>, pub default_message_notifications: Patch<DefaultMessageNotificationLevel>, pub explicit_content_filter: Patch<ExplicitContentFilterLevel>, pub afk_channel_id: Patch<ChannelId>, pub afk_timeout: Option<u32>, pub icon: Patch<ImageData>, pub splash: Patch<ImageData>, pub discovery_splash: Patch<ImageData>, pub banner: Patch<ImageData>, pub system_channel_id: Patch<ChannelId>, pub system_channel_flags: Option<SystemChannelFlags>, pub rules_channel_id: Patch<ChannelId>, pub public_updates_channel_id: Patch<ChannelId>, pub preferred_locale: Patch<Locale>, pub features: Option<Vec<Feature>>, pub description: Patch<CompactString>, pub premium_progress_bar_enabled: Option<bool>, pub safety_alerts_channel_id: Patch<ChannelId>,
}
Expand description

The body of Modify Guild.

Every field is optional; Patch fields can also be cleared. Adding or removing the COMMUNITY feature needs ADMINISTRATOR.

discord.js counterpart: GuildEditOptions.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§name: Option<CompactString>

The name.

§verification_level: Patch<VerificationLevel>

Who can talk in the guild.

§default_message_notifications: Patch<DefaultMessageNotificationLevel>

Which messages notify members by default.

§explicit_content_filter: Patch<ExplicitContentFilterLevel>

Whose media is scanned for explicit content.

§afk_channel_id: Patch<ChannelId>

The AFK voice channel.

§afk_timeout: Option<u32>

Seconds of inactivity before members are moved to the AFK channel: 60, 300, 900, 1800 or 3600.

§icon: Patch<ImageData>

The icon (1024×1024; an animated GIF with the ANIMATED_ICON feature).

§splash: Patch<ImageData>

The invite splash (16:9; needs the INVITE_SPLASH feature).

§discovery_splash: Patch<ImageData>

The discovery splash (16:9; needs the DISCOVERABLE feature).

§banner: Patch<ImageData>

The banner (16:9; needs the BANNER feature, animated with ANIMATED_BANNER).

§system_channel_id: Patch<ChannelId>

The channel of welcome and boost messages.

§system_channel_flags: Option<SystemChannelFlags>

Which messages the system channel shows (set flags suppress them).

§rules_channel_id: Patch<ChannelId>

The rules or guidelines channel of a community guild.

§public_updates_channel_id: Patch<ChannelId>

The channel where community guild moderators get notices from Discord.

§preferred_locale: Patch<Locale>

The language of a community guild (Discord’s default: en-US).

§features: Option<Vec<Feature>>

The enabled features (all of them).

§description: Patch<CompactString>

The description.

§premium_progress_bar_enabled: Option<bool>

Whether the boost progress bar is shown.

§safety_alerts_channel_id: Patch<ChannelId>

The channel where community guild moderators get safety alerts.

Trait Implementations§

Source§

impl Clone for ModifyGuild

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ModifyGuild

Source§

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

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

impl Default for ModifyGuild

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for ModifyGuild

Source§

impl Hash for ModifyGuild

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for ModifyGuild

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for ModifyGuild

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 StructuralPartialEq for ModifyGuild

Auto Trait Implementations§

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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.