blob: 399169189e351af28b2092d6f00d8f99ac62546a (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
from src import ModuleManager, utils
COMMANDS = ["!botlist", "!rollcall"]
MESSAGE = "Hi! I'm BitBot (https://git.io/bitbot) "
@utils.export("botset", utils.BoolSetting("botlist",
"Whether or not I should respond to !botlist commands"))
class Module(ModuleManager.BaseModule):
@utils.hook("received.message.channel")
def channel_message(self, event):
if (event["message"].strip() in COMMANDS and
self.bot.get_setting("botlist", False)):
event["channel"].send_message(MESSAGE)
|