From 51a52e2b0e54031cce5876f54d1d48c268b5441c Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 26 Sep 2018 18:27:17 +0100 Subject: Switch to using @Utils.hook and docstrings for event hooks --- modules/strax.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'modules/strax.py') 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"] -- cgit v1.3.1-10-gc9f91