Allow changing of prefix

This commit is contained in:
Firepup Sixfifty 2024-05-11 22:28:22 -05:00
parent 39f7f118e5
commit 4325b1c6d6
Signed by: Firepup650
GPG key ID: 7C92E2ABBBFAB9BA
2 changed files with 3 additions and 0 deletions

2
bot.py
View file

@ -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)

View file

@ -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"]