add support for Bug Hunter and Early Supporter flags
This commit is contained in:
parent
dd5762d9ed
commit
c184b0a53d
@ -214,9 +214,11 @@ class UserFlags(Enum):
|
|||||||
staff = 1
|
staff = 1
|
||||||
partner = 2
|
partner = 2
|
||||||
hypesquad = 4
|
hypesquad = 4
|
||||||
|
bug_hunter = 8
|
||||||
hypesquad_bravery = 64
|
hypesquad_bravery = 64
|
||||||
hypesquad_brilliance = 128
|
hypesquad_brilliance = 128
|
||||||
hypesquad_balance = 256
|
hypesquad_balance = 256
|
||||||
|
early_supporter = 512
|
||||||
|
|
||||||
class ActivityType(IntEnum):
|
class ActivityType(IntEnum):
|
||||||
unknown = -1
|
unknown = -1
|
||||||
|
@ -52,14 +52,22 @@ class Profile(namedtuple('Profile', 'flags user mutual_guilds connected_accounts
|
|||||||
def staff(self):
|
def staff(self):
|
||||||
return self._has_flag(UserFlags.staff)
|
return self._has_flag(UserFlags.staff)
|
||||||
|
|
||||||
@property
|
|
||||||
def hypesquad(self):
|
|
||||||
return self._has_flag(UserFlags.hypesquad)
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def partner(self):
|
def partner(self):
|
||||||
return self._has_flag(UserFlags.partner)
|
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
|
@property
|
||||||
def hypesquad_houses(self):
|
def hypesquad_houses(self):
|
||||||
flags = (UserFlags.hypesquad_bravery, UserFlags.hypesquad_brilliance, UserFlags.hypesquad_balance)
|
flags = (UserFlags.hypesquad_bravery, UserFlags.hypesquad_brilliance, UserFlags.hypesquad_balance)
|
||||||
|
@ -617,6 +617,12 @@ Profile
|
|||||||
.. attribute:: partner
|
.. attribute:: partner
|
||||||
|
|
||||||
A boolean indicating if the user is a Discord 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
|
.. attribute:: hypesquad
|
||||||
|
|
||||||
A boolean indicating if the user is in Discord HypeSquad.
|
A boolean indicating if the user is in Discord HypeSquad.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user