From 71152475b275107dbfd535abac13ebe0fb8e773f Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 26 Jul 2019 11:16:04 +0100 Subject: 8ball.py -> eightball.py closes #106 --- modules/8ball.py | 42 ------------------------------------------ modules/eightball.py | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 42 deletions(-) delete mode 100644 modules/8ball.py create mode 100644 modules/eightball.py (limited to 'modules') diff --git a/modules/8ball.py b/modules/8ball.py deleted file mode 100644 index 5cacecfd..00000000 --- a/modules/8ball.py +++ /dev/null @@ -1,42 +0,0 @@ -#--depends-on commands - -import random -from src import ModuleManager, utils - -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", - "As I see it, yes", - "It is certain", - "Naturally", - "Reply hazy, try again later", - utils.irc.underline(utils.irc.color("DO NOT WASTE MY TIME", - utils.consts.RED)), - "Hmm... Could be!", - "I'm leaning towards no", - "Without a doubt", - "Sources say no", - "Sources say yes", - "Sources say maybe" -] - -class Module(ModuleManager.BaseModule): - @utils.hook("received.command.8ball", min_args=1) - def decide(selfs, event): - """ - :help: Ask the mystic 8ball a question - :usage: - """ - event["stdout"].write("You shake the magic ball... it says %s" % - utils.irc.bold(random.choice(CHOICES))) diff --git a/modules/eightball.py b/modules/eightball.py new file mode 100644 index 00000000..eede3f5c --- /dev/null +++ b/modules/eightball.py @@ -0,0 +1,44 @@ +#--depends-on commands + +import random +from src import ModuleManager, utils + +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", + "As I see it, yes", + "It is certain", + "Naturally", + "Reply hazy, try again later", + utils.irc.underline(utils.irc.color("DO NOT WASTE MY TIME", + utils.consts.RED)), + "Hmm... Could be!", + "I'm leaning towards no", + "Without a doubt", + "Sources say no", + "Sources say yes", + "Sources say maybe" +] + +class Module(ModuleManager.BaseModule): + _name = "8Ball" + + @utils.hook("received.command.8ball", min_args=1) + def decide(selfs, event): + """ + :help: Ask the mystic 8ball a question + :usage: + """ + event["stdout"].write("You shake the magic ball... it says %s" % + utils.irc.bold(random.choice(CHOICES))) -- cgit v1.3.1-10-gc9f91