2018-09-01 10:04:51 +00:00
|
|
|
import random
|
|
|
|
|
2018-09-01 10:40:08 +00:00
|
|
|
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"
|
|
|
|
]
|
2018-09-01 10:04:51 +00:00
|
|
|
|
|
|
|
class Module(object):
|
2018-09-02 18:54:45 +00:00
|
|
|
def __init__(self, bot, events, exports):
|
2018-09-01 10:04:51 +00:00
|
|
|
events.on("received.command.8ball").hook(
|
|
|
|
self.decide,
|
|
|
|
min_args=1,
|
|
|
|
help="Ask the mystic 8ball a question!",
|
|
|
|
usage="<question>"
|
|
|
|
)
|
|
|
|
|
|
|
|
def decide(selfs, event):
|
2018-09-01 10:40:08 +00:00
|
|
|
event["stdout"].write(random.choice(CHOICES))
|