diff options
Diffstat (limited to 'discord/state.py')
| -rw-r--r-- | discord/state.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/discord/state.py b/discord/state.py index f04d6ee7..d56b9e75 100644 --- a/discord/state.py +++ b/discord/state.py @@ -33,6 +33,7 @@ import itertools import logging import math import weakref +import inspect from .guild import Guild from .activity import _ActivityTag @@ -88,6 +89,11 @@ class ConnectionState: self._activity = activity self._status = status + self.parsers = parsers = {} + for attr, func in inspect.getmembers(self): + if attr.startswith('parse_'): + parsers[attr[6:].upper()] = func + self.clear() def clear(self): |