aboutsummaryrefslogtreecommitdiff
path: root/modules/8all.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-01 11:43:33 +0100
committerGravatar GitHub2018-09-01 11:43:33 +0100
commit3ac6af53bcacd68ef6a9ef761d7071b62fff9d32 (patch)
treed63acad554abd035c0f2a2692a3756b236e440f9 /modules/8all.py
parentAdded functionality to load, unload and reload modules from a command! (diff)
parentomg it's the future (#15) (diff)
Merge pull request #11 from dngfx/master
Lots of module update, and new modules
Diffstat (limited to 'modules/8all.py')
-rw-r--r--modules/8all.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/modules/8all.py b/modules/8all.py
new file mode 100644
index 00000000..57be2da4
--- /dev/null
+++ b/modules/8all.py
@@ -0,0 +1,29 @@
+import random
+
+CHOICES = [
+ "Definitely",
+ "Yes",
+ "Probably",
+ "Maybe",
+ "Probably not",
+ "No",
+ "Definitely not",
+ "I don't know",
+ "Ask again later",
+ "The answer is unclear",
+ "Absolutely",
+ "Dubious at best",
+ "I'm on a break, ask again later"
+]
+
+class Module(object):
+ def __init__(self, bot, events):
+ events.on("received.command.8ball").hook(
+ self.decide,
+ min_args=1,
+ help="Ask the mystic 8ball a question!",
+ usage="<question>"
+ )
+
+ def decide(selfs, event):
+ event["stdout"].write(random.choice(CHOICES))