mod-base/__init__.py

13 lines
418 B
Python
Raw Normal View History

2020-04-21 23:25:16 +02:00
import inspect
from config import Config
import os
import toml
class BasePython:
def __init__(self, client):
with open(os.path.join(os.path.dirname(inspect.getfile(self.__class__)),"infos.toml")) as f:
self.infos = toml.load(f)
self.name = self.infos["name"]
self.client = client
self.config = Config(path=os.path.join(client.config["data_folder"], self.name.lower()))