Browse Source

Move verification_level to enum

pull/5/head
Andrei 9 years ago
parent
commit
6244ace275
  1. 15
      disco/types/guild.py

15
disco/types/guild.py

@ -1,14 +1,23 @@
from holster.enum import Enum
from disco.types.base import Model, snowflake, listof, dictof, datetime, text, binary
from disco.api.http import APIException from disco.api.http import APIException
from disco.util import to_snowflake from disco.util import to_snowflake
from disco.types.base import Model, snowflake, listof, dictof, datetime, text, binary, enum
from disco.types.user import User from disco.types.user import User
from disco.types.voice import VoiceState from disco.types.voice import VoiceState
from disco.types.permissions import PermissionValue, Permissions, Permissible from disco.types.permissions import PermissionValue, Permissions, Permissible
from disco.types.channel import Channel from disco.types.channel import Channel
VerificationLevel = Enum(
NONE=0,
LOW=1,
MEDIUM=2,
HIGH=3,
EXTREME=4,
)
class Emoji(Model): class Emoji(Model):
""" """
An emoji object An emoji object
@ -178,7 +187,7 @@ class Guild(Model, Permissible):
region = str region = str
afk_timeout = int afk_timeout = int
embed_enabled = bool embed_enabled = bool
verification_level = int verification_level = enum(VerificationLevel)
mfa_level = int mfa_level = int
features = listof(str) features = listof(str)
members = dictof(GuildMember, key='id') members = dictof(GuildMember, key='id')

Loading…
Cancel
Save