diff options
| author | 2019-11-15 10:57:29 +0000 | |
|---|---|---|
| committer | 2019-11-15 10:57:29 +0000 | |
| commit | 718a026beb8b1bd208083fdd59acc9fc6f2c8122 (patch) | |
| tree | c00d9e819d766683e5f99bcdd3127718a8f38817 /modules/botlist.py | |
| parent | update CHANGELOG.md (diff) | |
| signature | ||
don't respond to !botlist automatically
Diffstat (limited to 'modules/botlist.py')
| -rw-r--r-- | modules/botlist.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/botlist.py b/modules/botlist.py index 777f9777..39916918 100644 --- a/modules/botlist.py +++ b/modules/botlist.py @@ -3,8 +3,11 @@ 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: + if (event["message"].strip() in COMMANDS and + self.bot.get_setting("botlist", False)): event["channel"].send_message(MESSAGE) |
