Add 'bot-channel' config in bot.conf.example and use it, if present, in
bot_channel.py
This commit is contained in:
parent
7d59898485
commit
3e0bd3ee85
2 changed files with 6 additions and 2 deletions
|
@ -7,6 +7,9 @@ tls-certificate =
|
|||
tls-api-key =
|
||||
tls-api-certificate =
|
||||
|
||||
# the default channel BitBot automatically joins
|
||||
bot-channel =
|
||||
|
||||
# https://openweathermap.org/api
|
||||
openweathermap-api-key =
|
||||
|
||||
|
|
|
@ -5,5 +5,6 @@ from src import ModuleManager, utils
|
|||
class Module(ModuleManager.BaseModule):
|
||||
@utils.hook("received.numeric.001")
|
||||
def do_join(self, event):
|
||||
event["server"].send_join(event["server"].get_setting("bot-channel",
|
||||
"#bitbot"))
|
||||
bot_channel = event["server"].get_setting("bot-channel",
|
||||
self.bot.config.get("bot-channel", "#bitbot"))
|
||||
event["server"].send_join(bot_channel)
|
||||
|
|
Loading…
Reference in a new issue