Browse Source

Add BOT_HTTP_INTERACTIONS user flag

Adds UserFlags.bot_http_interactions and PublicUserFlags.bot_http_interactions
See: discord/discord-api-docs#3903
pull/7494/head
jack1142 3 years ago
committed by GitHub
parent
commit
820bde99e1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      discord/enums.py
  2. 9
      discord/flags.py
  3. 5
      docs/api.rst

1
discord/enums.py

@ -462,6 +462,7 @@ class UserFlags(Enum):
verified_bot = 65536
verified_bot_developer = 131072
discord_certified_moderator = 262144
bot_http_interactions = 524288
class ActivityType(Enum):

9
discord/flags.py

@ -419,6 +419,15 @@ class PublicUserFlags(BaseFlags):
"""
return UserFlags.discord_certified_moderator.value
@flag_value
def bot_http_interactions(self):
""":class:`bool`: Returns ``True`` if the user is a bot that only uses HTTP interactions
and is shown in the online member list.
.. versionadded:: 2.0
"""
return UserFlags.bot_http_interactions.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)]

5
docs/api.rst

@ -1363,6 +1363,11 @@ of :class:`enum.Enum`.
.. attribute:: discord_certified_moderator
The user is a Discord Certified Moderator.
.. attribute:: bot_http_interactions
The user is a bot that only uses HTTP interactions and is shown in the online member list.
.. versionadded:: 2.0
.. class:: ActivityType

Loading…
Cancel
Save