diff options
| author | 2019-07-11 13:42:21 +0100 | |
|---|---|---|
| committer | 2019-07-11 13:42:21 +0100 | |
| commit | c86ac45c15e77f82462edc58646d19c07a8e7a38 (patch) | |
| tree | 6f39ffab8506c7ff8ff249744b03e27feaf350e0 /modules | |
| parent | Show warning for private-only commands in channels and visa versa (diff) | |
| signature | ||
bots need snacks too
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/botsnack.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/botsnack.py b/modules/botsnack.py new file mode 100644 index 00000000..2add76dc --- /dev/null +++ b/modules/botsnack.py @@ -0,0 +1,19 @@ +#--depends-on commands + +import random +from src import ModuleManager, utils + +ACTIONS = [ + "cronch", + "munch", + "nom nom", + "wriggles excitedly" +] + +class Module(ModuleManager.BaseModule): + @utils.hook("received.command.botsnack") + @utils.kwarg("expect_output", False) + def botsnack(self, event): + event["target"].send_message("\x01ACTION %s\x01" % + random.choice(ACTIONS)) + |
