Browse Source
Add Discord Certified Moderator user flag
pull/6948/head
Stanisław Jelnicki
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
12 additions and
0 deletions
-
discord/enums.py
-
discord/flags.py
-
docs/api.rst
|
|
@ -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 |
|
|
|
|
|
@ -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)] |
|
|
|
|
|
@ -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 |
|
|
|
|
|
|
|