diff options
| -rw-r--r-- | discord/enums.py | 2 | ||||
| -rw-r--r-- | discord/user.py | 16 | ||||
| -rw-r--r-- | docs/api.rst | 6 |
3 files changed, 20 insertions, 4 deletions
diff --git a/discord/enums.py b/discord/enums.py index a6a615c4..1d032d56 100644 --- a/discord/enums.py +++ b/discord/enums.py @@ -214,9 +214,11 @@ class UserFlags(Enum): staff = 1 partner = 2 hypesquad = 4 + bug_hunter = 8 hypesquad_bravery = 64 hypesquad_brilliance = 128 hypesquad_balance = 256 + early_supporter = 512 class ActivityType(IntEnum): unknown = -1 diff --git a/discord/user.py b/discord/user.py index db4086ba..38820d5a 100644 --- a/discord/user.py +++ b/discord/user.py @@ -53,14 +53,22 @@ class Profile(namedtuple('Profile', 'flags user mutual_guilds connected_accounts return self._has_flag(UserFlags.staff) @property - def hypesquad(self): - return self._has_flag(UserFlags.hypesquad) - - @property def partner(self): return self._has_flag(UserFlags.partner) @property + def bug_hunter(self): + return self._has_flag(UserFlags.bug_hunter) + + @property + def early_supporter(self): + return self._has_flag(UserFlags.early_supporter) + + @property + def hypesquad(self): + return self._has_flag(UserFlags.hypesquad) + + @property def hypesquad_houses(self): flags = (UserFlags.hypesquad_bravery, UserFlags.hypesquad_brilliance, UserFlags.hypesquad_balance) return [house for house, flag in zip(HypeSquadHouse, flags) if self._has_flag(flag)] diff --git a/docs/api.rst b/docs/api.rst index 7fe668d5..ba7c3b34 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -617,6 +617,12 @@ Profile .. attribute:: partner A boolean indicating if the user is a Discord Partner. + .. attribute:: bug_hunter + + A boolean indicating if the user is a Bug Hunter. + .. attribute:: early_supporter + + A boolean indicating if the user has had premium before 10 October, 2018. .. attribute:: hypesquad A boolean indicating if the user is in Discord HypeSquad. |