Return config from Config.load_config instead of setting it on bot

This commit is contained in:
jesopo 2018-08-30 11:40:41 +01:00
parent c5d445c715
commit 568d714fb2
2 changed files with 4 additions and 3 deletions

View file

@ -14,4 +14,4 @@ class Config(object):
with open(self.full_location) as config_file:
parser = configparser.ConfigParser()
parser.read_string(config_file.read())
self.bot.config = dict(parser["bot"].items())
return dict(parser["bot"].items())

View file

@ -19,9 +19,10 @@ args = arg_parser.parse_args()
bot = IRCBot.Bot()
database = Database.Database(bot, args.database)
config_object = Config.Config(bot, args.config)
config = Config.Config(bot, args.config)
bot.database = database
bot.config_object = config_object
bot.config = config.load_config()
bot.args = args
bot.modules.load_modules()