Return config from Config.load_config instead of setting it on bot
This commit is contained in:
parent
c5d445c715
commit
568d714fb2
2 changed files with 4 additions and 3 deletions
|
@ -14,4 +14,4 @@ class Config(object):
|
||||||
with open(self.full_location) as config_file:
|
with open(self.full_location) as config_file:
|
||||||
parser = configparser.ConfigParser()
|
parser = configparser.ConfigParser()
|
||||||
parser.read_string(config_file.read())
|
parser.read_string(config_file.read())
|
||||||
self.bot.config = dict(parser["bot"].items())
|
return dict(parser["bot"].items())
|
||||||
|
|
5
start.py
5
start.py
|
@ -19,9 +19,10 @@ args = arg_parser.parse_args()
|
||||||
|
|
||||||
bot = IRCBot.Bot()
|
bot = IRCBot.Bot()
|
||||||
database = Database.Database(bot, args.database)
|
database = Database.Database(bot, args.database)
|
||||||
config_object = Config.Config(bot, args.config)
|
config = Config.Config(bot, args.config)
|
||||||
|
|
||||||
bot.database = database
|
bot.database = database
|
||||||
bot.config_object = config_object
|
bot.config = config.load_config()
|
||||||
bot.args = args
|
bot.args = args
|
||||||
bot.modules.load_modules()
|
bot.modules.load_modules()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue