2019-05-12 21:37:08 +00:00
|
|
|
from src import ModuleManager, utils
|
|
|
|
|
|
|
|
COMMANDS = ["!botlist", "!rollcall"]
|
|
|
|
MESSAGE = "Hi! I'm BitBot (https://git.io/bitbot) "
|
|
|
|
|
2019-11-15 10:57:29 +00:00
|
|
|
@utils.export("botset", utils.BoolSetting("botlist",
|
|
|
|
"Whether or not I should respond to !botlist commands"))
|
2019-05-12 21:37:08 +00:00
|
|
|
class Module(ModuleManager.BaseModule):
|
|
|
|
@utils.hook("received.message.channel")
|
|
|
|
def channel_message(self, event):
|
2019-11-15 10:57:29 +00:00
|
|
|
if (event["message"].strip() in COMMANDS and
|
|
|
|
self.bot.get_setting("botlist", False)):
|
2019-05-12 21:37:08 +00:00
|
|
|
event["channel"].send_message(MESSAGE)
|