aboutsummaryrefslogtreecommitdiff
path: root/modules/strax.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-26 18:27:17 +0100
committerGravatar jesopo2018-09-26 18:27:17 +0100
commit51a52e2b0e54031cce5876f54d1d48c268b5441c (patch)
treea4c0e8e86c55aa701b06297d5b5a2ceebeaab60d /modules/strax.py
parentAlso 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.py13
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"]