diff --git a/xmpp_discord_bridge/main.py b/xmpp_discord_bridge/main.py index bb7f7fc..1faa69e 100644 --- a/xmpp_discord_bridge/main.py +++ b/xmpp_discord_bridge/main.py @@ -510,8 +510,18 @@ def main(): raise Exception("config.toml not found") general = config["general"] + secret = "" + if not "secret" in general: + if "secret_file" in general: + with open(general["secret_file"], "r") as f: + secret = f.read().replace("\n", "") + else: + raise Exception("No component secret specified") + else: + secret = general["secret"] + xmpp = BridgeComponent(general["jid"], - general["secret"], + secret, general["server"], general["port"], general["discord_token"],