diff options
| author | Rapptz <[email protected]> | 2019-06-09 01:59:23 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-06-09 01:59:23 -0400 |
| commit | a92b4c2093433afab5625460a525ccf869db1671 (patch) | |
| tree | 4f9df1435de46a6c1a08dce538e4638ba4d12265 | |
| parent | Some documentation touch-ups and missing stuff in the changelog. (diff) | |
| download | discord.py-a92b4c2093433afab5625460a525ccf869db1671.tar.xz discord.py-a92b4c2093433afab5625460a525ccf869db1671.zip | |
Add EnumMeta.__len__ to not break user avatar code.
| -rw-r--r-- | discord/enums.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/discord/enums.py b/discord/enums.py index 218f3356..82371008 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 '<enum %r>' % cls.__name__ |