aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/constants.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bot/constants.py b/bot/constants.py
index 3776ceb84..ebd3b3d96 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -187,8 +187,9 @@ class YAMLGetter(type):
return cls.__getattr__(name)
def __iter__(cls):
- """Returns iterator of key: value pairs of current constants class."""
- return iter(_CONFIG_YAML[cls.section][cls.subsection].items())
+ """Return generator of key: value pairs of current constants class' config values."""
+ for name in cls.__annotations__:
+ yield name, getattr(cls, name)
# Dataclasses