From 8885b407ea6ea6b3592fa5cc3f35fe8a6307ca53 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 12 May 2019 22:37:08 +0100 Subject: [PATCH] Add !botlist and !rollcall --- modules/botlist.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 modules/botlist.py diff --git a/modules/botlist.py b/modules/botlist.py new file mode 100644 index 00000000..777f9777 --- /dev/null +++ b/modules/botlist.py @@ -0,0 +1,10 @@ +from src import ModuleManager, utils + +COMMANDS = ["!botlist", "!rollcall"] +MESSAGE = "Hi! I'm BitBot (https://git.io/bitbot) " + +class Module(ModuleManager.BaseModule): + @utils.hook("received.message.channel") + def channel_message(self, event): + if event["message"].strip() in COMMANDS: + event["channel"].send_message(MESSAGE)