#[non_exhaustive]pub enum Feature {
Show 41 variants
AnimatedBanner,
AnimatedIcon,
ApplicationCommandPermissionsV2,
AutoModeration,
Banner,
Community,
CreatorMonetizableProvisional,
CreatorStorePage,
DeveloperSupportServer,
Discoverable,
EnhancedRoleColors,
Featurable,
GuestsEnabled,
GuildTags,
HasDirectoryEntry,
Hub,
InvitesDisabled,
InviteSplash,
LinkedToHub,
MemberVerificationGateEnabled,
MonetizationEnabled,
MoreSoundboard,
MoreStickers,
News,
Partnered,
PinPermissionMigrationComplete,
PreviewEnabled,
PrivateThreads,
PruneRequiresAdmin,
RaidAlertsDisabled,
RelayEnabled,
RoleIcons,
RoleSubscriptionsAvailableForPurchase,
RoleSubscriptionsEnabled,
Soundboard,
TicketedEventsEnabled,
VanityUrl,
Verified,
VipRegions,
WelcomeScreenEnabled,
Unknown(CompactString),
}Expand description
A guild feature: something a guild has access to or has enabled.
Bots can toggle COMMUNITY, DISCOVERABLE, INVITES_DISABLED and
RAID_ALERTS_DISABLED when modifying a guild (with the required permissions).
discord.js counterpart: GuildFeature.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AnimatedBanner
Can set an animated banner.
AnimatedIcon
Can set an animated icon.
ApplicationCommandPermissionsV2
Uses the old application command permissions behavior.
AutoModeration
Has auto moderation rules set up.
Banner
Can set a banner.
Community
A Community guild: welcome screen, membership screening, stage channels, discovery and community updates.
CreatorMonetizableProvisional
Has enabled monetization.
CreatorStorePage
Has enabled the role subscription promo page.
DeveloperSupportServer
Is the support server of an app in the App Directory.
Discoverable
Can be discovered in the directory.
EnhancedRoleColors
Can give roles gradient colors.
Featurable
Can be featured in the directory.
GuestsEnabled
Has access to guest invites.
GuildTags
Can set guild (server) tags.
HasDirectoryEntry
Is listed in a directory channel.
Undocumented: known from discord-api-types, not in the official docs; may change without notice.
Hub
Is a Student Hub.
Undocumented: known from discord-api-types, not in the official docs; may change without notice.
InvitesDisabled
Has paused invites; no new users can join.
InviteSplash
Can set an invite splash background.
LinkedToHub
Is part of a Student Hub.
Undocumented: known from discord-api-types, not in the official docs; may change without notice.
MemberVerificationGateEnabled
Has enabled membership screening.
MonetizationEnabled
Has enabled monetization.
Undocumented: known from discord-api-types, not in the official docs; may change without notice.
MoreSoundboard
Has more custom soundboard sound slots.
MoreStickers
Has more custom sticker slots.
News
Can create announcement channels.
Partnered
Is partnered.
PinPermissionMigrationComplete
Has completed the migration to the separate pin-messages permission.
Undocumented: known from discord-api-types, not in the official docs; may change without notice.
PreviewEnabled
Can be previewed before joining (membership screening or the directory).
PrivateThreads
Can create private threads.
Undocumented: known from discord-api-types, not in the official docs; may change without notice.
PruneRequiresAdmin
Pruning members requires the administrator permission.
RaidAlertsDisabled
Has disabled raid alerts in the safety alerts channel.
RelayEnabled
Uses Discord’s relay (sharded gateway) infrastructure.
Undocumented: known from discord-api-types, not in the official docs; may change without notice.
RoleIcons
Can set role icons.
RoleSubscriptionsAvailableForPurchase
Has role subscriptions that can be purchased.
RoleSubscriptionsEnabled
Has enabled role subscriptions.
Soundboard
Has created soundboard sounds.
TicketedEventsEnabled
Has enabled ticketed events.
VanityUrl
Can set a vanity URL.
Verified
Is verified.
VipRegions
Can use 384 kbps voice bitrate (formerly VIP voice servers).
WelcomeScreenEnabled
Has enabled the welcome screen.
Unknown(CompactString)
A value that this version of the library does not know about.
Discord may add new values at any time. They are preserved here so that no
information is lost and deserialization never fails because of them. Prefer
Feature::from over constructing this variant directly.
Implementations§
Source§impl Feature
impl Feature
Sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
Returns the string Discord uses for this value.
discord.js counterpart: the enum’s string value in discord-api-types.
Sourcepub const fn is_unknown(&self) -> bool
pub const fn is_unknown(&self) -> bool
Returns true for a value this version of the library does not know about.
discord.js counterpart: none (discord.js passes unknown strings through).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Feature
impl<'de> Deserialize<'de> for Feature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
impl Eq for Feature
Source§impl Ord for Feature
impl Ord for Feature
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Auto Trait Implementations§
impl Forget for Feature
impl Freeze for Feature
impl Move for Feature
impl RefUnwindSafe for Feature
impl Send for Feature
impl Sync for Feature
impl Unpin for Feature
impl UnsafeUnpin for Feature
impl UnwindSafe for Feature
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more