Browse Source

Add Discord Certified Moderator user flag

pull/6948/head
Stanisław Jelnicki 4 years ago
committed by GitHub
parent
commit
65439732b3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      discord/enums.py
  2. 8
      discord/flags.py
  3. 3
      docs/api.rst

1
discord/enums.py

@ -397,6 +397,7 @@ class UserFlags(Enum):
bug_hunter_level_2 = 16384
verified_bot = 65536
verified_bot_developer = 131072
discord_certified_moderator = 262144
class ActivityType(Enum):
unknown = -1

8
discord/flags.py

@ -386,6 +386,14 @@ class PublicUserFlags(BaseFlags):
"""
return UserFlags.verified_bot_developer.value
@flag_value
def discord_certified_moderator(self):
""":class:`bool`: Returns ``True`` if the user is a Discord Certified Moderator.
.. versionadded:: 2.0
"""
return UserFlags.discord_certified_moderator.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)]

3
docs/api.rst

@ -1130,6 +1130,9 @@ of :class:`enum.Enum`.
.. attribute:: verified_bot_developer
The user is an Early Verified Bot Developer.
.. attribute:: discord_certified_moderator
The user is a Discord Certified Moderator.
.. class:: ActivityType

Loading…
Cancel
Save