aboutsummaryrefslogtreecommitdiff
path: root/modules/8ball.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/8ball.py')
-rw-r--r--modules/8ball.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/modules/8ball.py b/modules/8ball.py
index 37d38743..ebfb1b0c 100644
--- a/modules/8ball.py
+++ b/modules/8ball.py
@@ -1,5 +1,5 @@
import random
-from src import Utils
+from src import ModuleManager, Utils
CHOICES = [
"Definitely",
@@ -28,15 +28,11 @@ CHOICES = [
"Sources say maybe"
]
-class Module(object):
- def __init__(self, bot, events, exports):
- events.on("received.command.8ball").hook(
- self.decide,
- min_args=1,
- help="Ask the mystic 8ball a question!",
- usage="<question>"
- )
-
+class Module(ModuleManager.BaseModule):
+ @Utils.hook("received.command.8ball", min_args=1, usage="<question>")
def decide(selfs, event):
+ """
+ Ask the mystic 8ball a question!
+ """
event["stdout"].write("You shake the magic ball... it "
"says " + Utils.bold(random.choice(CHOICES)))