mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-08 10:53:10 +00:00
Add support for user flags in Profile.
This commit is contained in:
@ -28,7 +28,7 @@ from enum import Enum
|
||||
|
||||
__all__ = ['ChannelType', 'MessageType', 'VoiceRegion', 'VerificationLevel',
|
||||
'ContentFilter', 'Status', 'DefaultAvatar', 'RelationshipType',
|
||||
'AuditLogAction', 'AuditLogActionCategory', ]
|
||||
'AuditLogAction', 'AuditLogActionCategory', 'UserFlags', ]
|
||||
|
||||
class ChannelType(Enum):
|
||||
text = 0
|
||||
@ -204,6 +204,11 @@ class AuditLogAction(Enum):
|
||||
elif v < 80:
|
||||
return 'message'
|
||||
|
||||
class UserFlags(Enum):
|
||||
staff = 1
|
||||
partner = 2
|
||||
hypesquad = 4
|
||||
|
||||
def try_enum(cls, val):
|
||||
"""A function that tries to turn the value into enum ``cls``.
|
||||
|
||||
|
Reference in New Issue
Block a user