From ac4d2c1834b316dce66095f2bf1f8aa94f7ad9e7 Mon Sep 17 00:00:00 2001 From: NeloBlivion <41271523+NeloBlivion@users.noreply.github.com> Date: Tue, 22 Nov 2022 13:59:27 +0000 Subject: [PATCH] chore: Update Guild.features docs and literal (#1788) Co-authored-by: BobDotCom <71356958+BobDotCom@users.noreply.github.com> Co-authored-by: Lala Sabathil --- CHANGELOG.md | 2 ++ discord/guild.py | 7 ++++++- discord/types/guild.py | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b61e6a663..111e13dbed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,8 @@ These changes are available on the `master` branch, but have not yet been releas ([#1636](https://github.com/Pycord-Development/pycord/pull/1636)) - Added `bridge_commands` attribute to `ext.bridge.Bot` for access to bridge command objects. ([#1787](https://github.com/Pycord-Development/pycord/pull/1787)) +- Updated `Guild.features` to include new and previously missing features. + ([#1788](https://github.com/Pycord-Development/pycord/pull/1788)) ### Fixed diff --git a/discord/guild.py b/discord/guild.py index b8d430815f..b3436b16c9 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -208,17 +208,20 @@ class Guild(Hashable): - ``ANIMATED_BANNER``: Guild can upload an animated banner. - ``ANIMATED_ICON``: Guild can upload an animated icon. + - ``APPLICATION_COMMAND_PERMISSIONS_V2``: Guild is using the old command permissions behavior. - ``AUTO_MODERATION``: Guild has enabled the auto moderation system. - ``BANNER``: Guild can upload and use a banner. (i.e. :attr:`.banner`) - ``CHANNEL_BANNER``: Guild can upload and use a channel banners. - ``COMMERCE``: Guild can sell things using store channels, which have now been removed. - ``COMMUNITY``: Guild is a community server. + - ``DEVELOPER_SUPPORT_SERVER``: Guild has been set as a support server on the App Directory. - ``DISCOVERABLE``: Guild shows up in Server Discovery. + - ``FEATURABLE``: Guild can be featured in the Server Directory. - ``HAS_DIRECTORY_ENTRY``: Unknown. - ``HUB``: Hubs contain a directory channel that let you find school-related, student-run servers for your school or university. - ``INTERNAL_EMPLOYEE_ONLY``: Indicates that only users with the staff badge can join the guild. - - ``INVITE_SPLASH``: Guild's invite page can have a special splash. - ``INVITES_DISABLED``: Guild Invites are disabled. + - ``INVITE_SPLASH``: Guild's invite page can have a special splash. - ``LINKED_TO_HUB``: 'Guild is linked to a hub. - ``MEMBER_PROFILES``: Unknown. - ``MEMBER_VERIFICATION_GATE_ENABLED``: Guild has Membership Screening enabled. @@ -233,8 +236,10 @@ class Guild(Hashable): - ``ROLE_ICONS``: Guild can set an image or emoji as a role icon. - ``ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE``: Role subscriptions are available for purchasing. - ``ROLE_SUBSCRIPTIONS_ENABLED``: Guild is able to view and manage role subscriptions. + - ``SEVEN_DAY_THREAD_ARCHIVE``: Users can set the thread archive time to 7 days. - ``TEXT_IN_VOICE_ENABLED``: Guild has a chat button inside voice channels that opens a dedicated text channel in a sidebar similar to thread view. - ``THREADS_ENABLED_TESTING``: Used by bot developers to test their bots with threads in guilds with 5 or fewer members and a bot. Also gives the premium thread features. + - ``THREE_DAY_THREAD_ARCHIVE``: Users can set the thread archive time to 3 days. - ``TICKETED_EVENTS_ENABLED``: Guild has enabled ticketed events. - ``VANITY_URL``: Guild can have a vanity invite URL (e.g. discord.gg/discord-api). - ``VERIFIED``: Guild is a verified server. diff --git a/discord/types/guild.py b/discord/types/guild.py index 76f69c582e..567f36d5cc 100644 --- a/discord/types/guild.py +++ b/discord/types/guild.py @@ -59,14 +59,19 @@ class UnavailableGuild(TypedDict): GuildFeature = Literal[ "ANIMATED_BANNER", "ANIMATED_ICON", + "APPLICATION_COMMAND_PERMISSIONS_V2", "AUTO_MODERATION", "BANNER", + "CHANNEL_BANNER", "COMMERCE", "COMMUNITY", + "DEVELOPER_SUPPORT_SERVER", "DISCOVERABLE", "FEATURABLE", "HAS_DIRECTORY_ENTRY", "HUB", + "INTERNAL_EMPLOYEE_ONLY", + "INVITES_DISABLED", "INVITE_SPLASH", "LINKED_TO_HUB", "MEMBER_PROFILES",