mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-03 18:42:43 +00:00
Cast activity enumerator to integer instead of accessing value directly
Should make the library more resilient to future changes.
This commit is contained in:
parent
a136def52f
commit
1e982e0042
@ -175,7 +175,7 @@ class Activity(_ActivityTag):
|
||||
continue
|
||||
|
||||
ret[attr] = value
|
||||
ret['type'] = self.type.value
|
||||
ret['type'] = int(self.type)
|
||||
return ret
|
||||
|
||||
@property
|
||||
|
@ -380,6 +380,9 @@ class ActivityType(Enum):
|
||||
listening = 2
|
||||
watching = 3
|
||||
|
||||
def __int__(self):
|
||||
return self.value
|
||||
|
||||
class HypeSquadHouse(Enum):
|
||||
bravery = 1
|
||||
brilliance = 2
|
||||
|
Loading…
x
Reference in New Issue
Block a user