diff --git a/discord/enums.py b/discord/enums.py index d7bc06932..498f5adfe 100644 --- a/discord/enums.py +++ b/discord/enums.py @@ -53,7 +53,6 @@ __all__ = ( 'ButtonStyle', 'StagePrivacyLevel', 'InteractionType', - 'InteractionResponseType', 'NSFWLevel', 'RelationshipType', 'HypeSquadHouse', @@ -530,6 +529,7 @@ class UserFlags(Enum): partner = 2 hypesquad = 4 bug_hunter = 8 + bug_hunter_level_1 = 8 mfa_sms = 16 premium_promo_dismissed = 32 hypesquad_bravery = 64 @@ -543,6 +543,8 @@ class UserFlags(Enum): verified_bot = 65536 verified_bot_developer = 131072 discord_certified_moderator = 262144 + bot_http_interactions = 524288 + spammer = 1048576 class ActivityType(Enum): @@ -637,11 +639,11 @@ class UnavailableGuildType(Enum, comparable=True): class RequiredActionType(Enum, comparable=True): - verify_phone = 'REQUIRE_VERIFIED_PHONE' - verify_email = 'REQUIRE_VERIFIED_EMAIL' - captcha = 'REQUIRE_CAPTCHA' - accept_terms = 'AGREEMENTS' - + verify_phone = 'REQUIRE_VERIFIED_PHONE' + verify_email = 'REQUIRE_VERIFIED_EMAIL' + complete_captcha = 'REQUIRE_CAPTCHA' + accept_terms = 'AGREEMENTS' + class BrowserEnum(Enum): google_chrome = 'chrome' @@ -664,16 +666,6 @@ class InteractionType(Enum): component = 3 -class InteractionResponseType(Enum): - pong = 1 - # ack = 2 (deprecated) - # channel_message = 3 (deprecated) - channel_message = 4 # (with source) - deferred_channel_message = 5 # (with source) - deferred_message_update = 6 # for components - message_update = 7 # for components - - class VideoQualityMode(Enum): auto = 1 full = 2 diff --git a/discord/flags.py b/discord/flags.py index 99d2ef2f2..81f6ee543 100644 --- a/discord/flags.py +++ b/discord/flags.py @@ -346,9 +346,20 @@ class PublicUserFlags(BaseFlags): @flag_value def bug_hunter(self): - """:class:`bool`: Returns ``True`` if the user is a Bug Hunter""" + """:class:`bool`: Returns ``True`` if the user is a level 1 Bug Hunter + + There is an alias of this called :attr:`bug_hunter_level_1`. + """ return UserFlags.bug_hunter.value + @alias_flag_value + def bug_hunter_level_1(self): + """:class:`bool`: Returns ``True`` if the user is a Bug Hunter + + This is an alias of :attr:`bug_hunter`. + """ + return UserFlags.bug_hunter_level_1.value + @flag_value def hypesquad_bravery(self): """:class:`bool`: Returns ``True`` if the user is a HypeSquad Bravery member.""" @@ -381,7 +392,7 @@ class PublicUserFlags(BaseFlags): @flag_value def bug_hunter_level_2(self): - """:class:`bool`: Returns ``True`` if the user is a Bug Hunter Level 2""" + """:class:`bool`: Returns ``True`` if the user is a level 2 Bug Hunter""" return UserFlags.bug_hunter_level_2.value @flag_value @@ -410,6 +421,16 @@ class PublicUserFlags(BaseFlags): """ return UserFlags.discord_certified_moderator.value + @flag_value + def bot_http_interactions(self): + """:class:`bool`: Returns ``True`` if the bot doesn't connect to the gateway but should still be shown as online.""" + return UserFlags.bot_http_interactions.value + + @flag_value + def spammer(self): + """:class:`bool`: Returns ``True`` if the user is marked as a spammer.""" + return UserFlags.spammer.value + def all(self) -> List[UserFlags]: """List[:class:`UserFlags`]: Returns all public flags the user has.""" return [public_flag for public_flag in UserFlags if self._has_flag(public_flag.value)] @@ -575,6 +596,11 @@ class ApplicationFlags(BaseFlags): """:class:`bool`: Returns ``True`` if the application is embedded within the Discord client.""" return 1 << 17 + @flag_value + def embedded_first_party(self): + """:class:`bool`: Returns ``True`` if a first party application is emdedded within the Discord client.""" + return 1 << 20 + class GuildSubscriptionOptions: r"""Controls the library's auto-subscribing feature.