2019-05-25 20:40:06 +00:00
|
|
|
#--depends-on commands
|
|
|
|
|
2018-09-01 10:04:51 +00:00
|
|
|
import random
|
2018-10-03 12:22:37 +00:00
|
|
|
from src import ModuleManager, 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",
|
2018-10-03 12:22:37 +00:00
|
|
|
utils.irc.underline(utils.irc.color("DO NOT WASTE MY TIME",
|
2018-11-13 16:02:26 +00:00
|
|
|
utils.consts.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
|
|
|
|
2018-09-26 17:27:17 +00:00
|
|
|
class Module(ModuleManager.BaseModule):
|
2019-07-26 10:16:04 +00:00
|
|
|
_name = "8Ball"
|
|
|
|
|
2019-09-09 13:25:19 +00:00
|
|
|
@utils.hook("received.command.8", alias_of="8ball")
|
2018-10-03 12:22:37 +00:00
|
|
|
@utils.hook("received.command.8ball", min_args=1)
|
2019-09-09 13:25:19 +00:00
|
|
|
@utils.kwarg("help", "Ask the mystic 8ball a question")
|
|
|
|
@utils.kwarg("usage", "<question>")
|
2018-09-01 10:04:51 +00:00
|
|
|
def decide(selfs, event):
|
2018-11-17 12:48:42 +00:00
|
|
|
event["stdout"].write("You shake the magic ball... it says %s" %
|
|
|
|
utils.irc.bold(random.choice(CHOICES)))
|