From 4325b1c6d67830a2ad2026cb6ddd8e0e4bbc3046 Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Sat, 11 May 2024 22:28:22 -0500 Subject: [PATCH] Allow changing of prefix --- bot.py | 2 ++ config.py | 1 + 2 files changed, 3 insertions(+) diff --git a/bot.py b/bot.py index ee10ced..7174fda 100644 --- a/bot.py +++ b/bot.py @@ -83,6 +83,7 @@ class bot(bare.bot): for line in f.readlines(): TMFeed.extend([line.strip().split()]) self.markov = MarkovBot(TMFeed) + conf.prefix = (conf.servers[server]["prefix"] if "prefix" in conf.servers[server] else ".") self.log(f"Start init for {self.server}") def connect(self) -> None: @@ -320,6 +321,7 @@ class bot(bare.bot): if "interval" in conf.servers[self.server] else 50 ) + conf.prefix = (conf.servers[server]["prefix"] if "prefix" in conf.servers[server] else ".") reload(cmds) reload(handlers) self.msg("Reloaded successfully", chan) diff --git a/config.py b/config.py index eaafb98..bb88d4b 100644 --- a/config.py +++ b/config.py @@ -67,6 +67,7 @@ servers: dict[str, dict[str, Any]] = { "#firepup650": 0, }, "admins": ["firepup650"], + "prefix": "!" }, } admin_hosts: list[str] = ["firepup.firepi", "47.221.227.180"]