aboutsummaryrefslogtreecommitdiff
path: root/config.py
blob: 6686a06b8a84f3f8ef214f80a6039da56efc819f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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))