diff options
| author | 2018-09-01 11:04:51 +0100 | |
|---|---|---|
| committer | 2018-09-01 11:04:51 +0100 | |
| commit | 80cbf2d66eed9199635503968618d56db7c679ca (patch) | |
| tree | 1e7e8dcff191b6e537a24a5ffe2f5756e77af540 /modules | |
| parent | Cosmetic enhancement for ducks and dice. (diff) | |
| signature | ||
Add 8ball module
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/8all.py | 30 |
1 files changed, 30 insertions, 0 deletions
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="<question>" + ) + + 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)) |
