diff options
| author | 2018-09-01 11:45:29 +0100 | |
|---|---|---|
| committer | 2018-09-01 11:45:29 +0100 | |
| commit | 090531c0ae4045c4a9d07418f9ef941debcbbd73 (patch) | |
| tree | 45d3e7769191a7c5483114280f6b4032a16f11ed /modules/8ball.py | |
| parent | omg it's the future (#15) (diff) | |
| signature | ||
Omg I can't spell.
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)) |
