bitbot-3.11-fork/modules/8ball.py

43 lines
1 KiB
Python
Raw Normal View History

2018-09-01 10:04:51 +00:00
import random
from src import Utils
2018-09-01 10:04:51 +00:00
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",
2018-09-08 16:02:03 +00:00
"I'm on a break, ask again later",
"As I see it, yes",
"It is certain",
"Naturally",
"Reply hazy, try again later",
Utils.underline(Utils.color("DO NOT WASTE MY TIME", Utils.COLOR_RED)),
2018-09-08 16:19:52 +00:00
"Hmm... Could be!",
"I'm leaning towards no",
"Without a doubt",
"Sources say no",
"Sources say yes",
"Sources say maybe"
2018-09-01 10:40:08 +00:00
]
2018-09-01 10:04:51 +00:00
class Module(object):
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):
event["stdout"].write("You shake the magic ball... it "
"says " + Utils.bold(random.choice(CHOICES)))