SpiceBot/SpiceBot/SpiceBotCore/config/__init__.py
deathbybandaid fd73177035 test
2022-02-09 15:20:19 -05:00

26 lines
531 B
Python

class Config():
def __init__(self, script_dir, bot):
self.script_dir = script_dir
self.bot = bot
self.internal = {}
self.core_setup()
def core_setup(self):
self.internal["paths"] = {
"script_dir": self.script_dir
}
def __getattr__(self, name):
"""
Quick and dirty shortcuts. Will only get called for undefined attributes.
"""
if hasattr(self.bot.config, name):
return eval("self.bot.config.%s" % name)