2018-10-03 12:22:37 +00:00
|
|
|
from src import ModuleManager, utils
|
2018-09-12 14:44:50 +00:00
|
|
|
|
2018-10-03 12:22:37 +00:00
|
|
|
@utils.export("serverset", {"setting": "bot-channel",
|
2019-05-23 09:28:14 +00:00
|
|
|
"help": "Set main channel", "example": "#bitbot"})
|
2018-09-27 10:45:23 +00:00
|
|
|
class Module(ModuleManager.BaseModule):
|
2019-02-16 15:53:14 +00:00
|
|
|
@utils.hook("received.001")
|
2018-09-12 14:44:50 +00:00
|
|
|
def do_join(self, event):
|
2018-12-06 12:13:59 +00:00
|
|
|
bot_channel = event["server"].get_setting("bot-channel",
|
|
|
|
self.bot.config.get("bot-channel", "#bitbot"))
|
|
|
|
event["server"].send_join(bot_channel)
|