Add PremiumType enumeration and ClientUser.premium_type

This commit is contained in:
Liam H
2019-01-23 17:45:35 -06:00
committed by Rapptz
parent 9765b701f2
commit 79f172cf80
2 changed files with 11 additions and 3 deletions

View File

@ -29,7 +29,8 @@ from enum import Enum, IntEnum
__all__ = ['ChannelType', 'MessageType', 'VoiceRegion', 'SpeakingState',
'VerificationLevel', 'ContentFilter', 'Status', 'DefaultAvatar',
'RelationshipType', 'AuditLogAction', 'AuditLogActionCategory',
'UserFlags', 'ActivityType', 'HypeSquadHouse', 'NotificationLevel']
'UserFlags', 'ActivityType', 'HypeSquadHouse', 'NotificationLevel',
'PremiumType']
class ChannelType(Enum):
text = 0
@ -245,6 +246,10 @@ class HypeSquadHouse(Enum):
brilliance = 2
balance = 3
class PremiumType(Enum):
nitro_classic = 1
nitro = 2
def try_enum(cls, val):
"""A function that tries to turn the value into enum ``cls``.