bitbot-3.11-fork/modules/bot_channel.py

11 lines
420 B
Python
Raw Normal View History

from src import ModuleManager, utils
@utils.export("serverset", {"setting": "bot-channel",
2019-05-23 09:28:14 +00:00
"help": "Set main channel", "example": "#bitbot"})
class Module(ModuleManager.BaseModule):
@utils.hook("received.001")
def do_join(self, event):
bot_channel = event["server"].get_setting("bot-channel",
self.bot.config.get("bot-channel", "#bitbot"))
event["server"].send_join(bot_channel)