aboutsummaryrefslogtreecommitdiff
path: root/modules/shakespeare.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/shakespeare.py')
-rw-r--r--modules/shakespeare.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/modules/shakespeare.py b/modules/shakespeare.py
index bc4a9900..99d4ba2d 100644
--- a/modules/shakespeare.py
+++ b/modules/shakespeare.py
@@ -1,5 +1,5 @@
import random
-from src import Utils
+from src import ModuleManager, Utils
INSULT_INTRO = ["Thou art a", "Ye", "Thou", "Thy", "Thee"]
@@ -51,14 +51,8 @@ INSULT_PART_3 = ["apple-john", "baggage", "barnacle", "bladder", "boar-pig",
"vassal", "whey-face", "wagtail"]
-class Module(object):
-
- def __init__(self, bot, events, exports):
- self.bot = bot
- self.events = events
-
- events.on("received.command.insult").hook(self.dispense_insult)
-
+class Module(ModuleManager.BaseModule):
+ @Utils.hook("received.command.insult")
def dispense_insult(self, event):
insult = [random.choice(INSULT_INTRO), random.choice(INSULT_PART_1),
random.choice(INSULT_PART_2), random.choice(INSULT_PART_3)]