mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-08 10:53:10 +00:00
Add PremiumType enumeration and ClientUser.premium_type
This commit is contained in:
@ -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``.
|
||||
|
||||
|
Reference in New Issue
Block a user