From 6244ace275db639644c8674dd55ab41947320780 Mon Sep 17 00:00:00 2001 From: Andrei Date: Fri, 7 Oct 2016 04:12:51 -0500 Subject: [PATCH] Move verification_level to enum --- disco/types/guild.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/disco/types/guild.py b/disco/types/guild.py index 9cc6943..81e7a85 100644 --- a/disco/types/guild.py +++ b/disco/types/guild.py @@ -1,14 +1,23 @@ - -from disco.types.base import Model, snowflake, listof, dictof, datetime, text, binary +from holster.enum import Enum from disco.api.http import APIException 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.voice import VoiceState from disco.types.permissions import PermissionValue, Permissions, Permissible from disco.types.channel import Channel +VerificationLevel = Enum( + NONE=0, + LOW=1, + MEDIUM=2, + HIGH=3, + EXTREME=4, +) + + class Emoji(Model): """ An emoji object @@ -178,7 +187,7 @@ class Guild(Model, Permissible): region = str afk_timeout = int embed_enabled = bool - verification_level = int + verification_level = enum(VerificationLevel) mfa_level = int features = listof(str) members = dictof(GuildMember, key='id')