diff options
| author | 2018-09-26 18:27:17 +0100 | |
|---|---|---|
| committer | 2018-09-26 18:27:17 +0100 | |
| commit | 51a52e2b0e54031cce5876f54d1d48c268b5441c (patch) | |
| tree | a4c0e8e86c55aa701b06297d5b5a2ceebeaab60d /modules/strax.py | |
| parent | Also use docstrings to check if a command has help available, allow one-string (diff) | |
| signature | ||
Switch to using @Utils.hook and docstrings for event hooks
Diffstat (limited to 'modules/strax.py')
| -rw-r--r-- | modules/strax.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/modules/strax.py b/modules/strax.py index 0a189b48..385c825b 100644 --- a/modules/strax.py +++ b/modules/strax.py @@ -1,12 +1,13 @@ import random +from src import ModuleManager, Utils - -class Module(object): - def __init__(self, bot, events, exports): - events.on("received.command.strax").hook( - self.strax, help="Suggests a glorious method of battle for the glory of the Sontaran Empire, through IRC!") - +class Module(ModuleManager.BaseModule): + @Utils.hook("received.command.strax") def strax(self, event): + """ + Suggests a glorious method of battle for the glory of the Sontaran + Empire, through IRC! + """ suggestion_greeting = ["Might I suggest", "Can I suggest", "Should we attack immediately with"] command_greeting = ["We should attack now with", "We must attack now with", "I suggest attacking with", "We should coordinate an attack with"] |
