diff options
| author | 2018-09-01 11:43:33 +0100 | |
|---|---|---|
| committer | 2018-09-01 11:43:33 +0100 | |
| commit | 3ac6af53bcacd68ef6a9ef761d7071b62fff9d32 (patch) | |
| tree | d63acad554abd035c0f2a2692a3756b236e440f9 /modules/8all.py | |
| parent | Added functionality to load, unload and reload modules from a command! (diff) | |
| parent | omg 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.py | 29 |
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)) |
