diff options
Diffstat (limited to 'modules/8ball.py')
| -rw-r--r-- | modules/8ball.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/modules/8ball.py b/modules/8ball.py new file mode 100644 index 00000000..57be2da4 --- /dev/null +++ b/modules/8ball.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)) |
