The config.json is opened in more than one spot in main.py, including one case where a Halibot class is instantiated just to call _load_config().
This should all be factored out into a load_config() function in main.py, and _load_config() on the Halibot class should take in a dictionary as an argument instead.
Writes to config.json in main.py should stay as they are, probably.
There should be some kind of more-centralized configuration loading system, so main.py and Halibot use the same interface for loading/writing a config file.
The
config.jsonis opened in more than one spot inmain.py, including one case where aHalibotclass is instantiated just to call_load_config().This should all be factored out into aload_config()function inmain.py, and_load_config()on theHalibotclass should take in a dictionary as an argument instead.Writes toconfig.jsoninmain.pyshould stay as they are, probably.There should be some kind of more-centralized configuration loading system, so
main.pyandHalibotuse the same interface for loading/writing a config file.