diff options
Diffstat (limited to 'config.py')
-rw-r--r-- | config.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/config.py b/config.py new file mode 100644 index 0000000..6686a06 --- /dev/null +++ b/config.py @@ -0,0 +1,16 @@ +from typing import List + +import yaml + + +class Config(object): + token: str + admin_roles: List[int] + + def __init__(self, **args): + self.__dict__.update(args) + + @classmethod + def load(cls, file): + with open(file) as f: + return cls(**yaml.load(f)) |