config initialization
This commit is contained in:
parent
c4e97476f3
commit
542ccee7af
|
|
@ -62,7 +62,7 @@ class DiscordBotPlugin(PHALPlugin):
|
|||
}
|
||||
}
|
||||
update_mycroft_config(config=config_patch, bus=self.bus)
|
||||
self.init_configuration()
|
||||
self.init_configuration()
|
||||
|
||||
def init_configuration(self, message=None):
|
||||
""" Initialize instance configuration """
|
||||
|
|
@ -72,9 +72,6 @@ class DiscordBotPlugin(PHALPlugin):
|
|||
self.config = {"host": configuration_host, "api_key": configuration_api_key, "admin_id": configuration_admin_id }
|
||||
config_json = json.dumps(config)
|
||||
LOG.info(f"Configuration updated: %s", config_json)
|
||||
|
||||
if not configuration_host:
|
||||
uninitialized_settings.append("host")
|
||||
|
||||
if not configuration_api_key:
|
||||
uninitialized_settings.append("api_key")
|
||||
|
|
@ -92,6 +89,7 @@ class DiscordBotPlugin(PHALPlugin):
|
|||
|
||||
def init_bot(self):
|
||||
# Start the Discord bot
|
||||
LOG.info("Starting the bot")
|
||||
self.bot.run(TOKEN)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue