Implement Webhook.type

This commit is contained in:
NCPlayz
2019-11-23 12:44:50 +00:00
committed by Rapptz
parent dc86670d7f
commit f554819506
3 changed files with 28 additions and 3 deletions

View File

@ -49,6 +49,7 @@ __all__ = (
'FriendFlags',
'TeamMembershipState',
'Theme',
'WebhookType',
)
def _create_value_cls(name):
@ -419,6 +420,10 @@ class TeamMembershipState(Enum):
invited = 1
accepted = 2
class WebhookType(Enum):
incoming = 1
channel_follower = 2
def try_enum(cls, val):
"""A function that tries to turn the value into enum ``cls``.