bots need snacks too
This commit is contained in:
parent
e7e32c0978
commit
c86ac45c15
1 changed files with 19 additions and 0 deletions
19
modules/botsnack.py
Normal file
19
modules/botsnack.py
Normal file
|
@ -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))
|
||||
|
Loading…
Reference in a new issue