From a92b4c2093433afab5625460a525ccf869db1671 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sun, 9 Jun 2019 01:59:23 -0400 Subject: [PATCH] Add EnumMeta.__len__ to not break user avatar code. --- discord/enums.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/discord/enums.py b/discord/enums.py index 218f33567..823710084 100644 --- a/discord/enums.py +++ b/discord/enums.py @@ -97,6 +97,9 @@ class EnumMeta(type): def __iter__(cls): return (cls._enum_member_map_[name] for name in cls._enum_member_names_) + def __len__(cls): + return len(cls._enum_member_names_) + def __repr__(cls): return '' % cls.__name__