From 80cbf2d66eed9199635503968618d56db7c679ca Mon Sep 17 00:00:00 2001 From: dngfx <294904+dngfx@users.noreply.github.com> Date: Sat, 1 Sep 2018 11:04:51 +0100 Subject: [PATCH] Add 8ball module --- modules/8all.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 modules/8all.py diff --git a/modules/8all.py b/modules/8all.py new file mode 100644 index 00000000..db5e4d3f --- /dev/null +++ b/modules/8all.py @@ -0,0 +1,30 @@ +import random + + +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="" + ) + + def decide(selfs, event): + 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" + ] + + event["stdout"].write(random.choice(choices))