diff --git a/sopel_modules/SpiceBot_AI/AI.py b/sopel_modules/SpiceBot_AI/AI.py index eda930e..97adc03 100644 --- a/sopel_modules/SpiceBot_AI/AI.py +++ b/sopel_modules/SpiceBot_AI/AI.py @@ -10,70 +10,6 @@ from sopel_modules.SpiceBot_SBTools import sopel_triggerargs, googlesearch, bot_ from sopel_modules.SpiceBot_Events.System import bot_events_check -@sopel.module.rule(r'(?i)(hi|hello|hey),? $nickname[ \t]*$') -def bot_command_hello(bot, trigger): - hello = spicemanip.main(['Hi', 'Hey', 'Hello'], "random") - punctuation = spicemanip.main(['', '!', '?'], "random") - bot.osd(hello + ' ' + trigger.nick + punctuation) - - -@sopel.module.nickname_commands('hello', 'hi', 'hey') -def bot_command_hello_b(bot, trigger): - bot_command_hello(bot, trigger) - - -@sopel.module.rule(r'(?i)(bye|goodbye|gtg|seeya|cya|ttyl|g2g|gnight|goodnight),? $nickname[ \t]*$') -def bot_command_goodbye(bot, trigger): - byemsg = spicemanip.main(['Bye', 'Goodbye', 'Seeya', 'Auf Wiedersehen', 'Au revoir', 'Ttyl'], "random") - punctuation = spicemanip.main(['!', ''], "random") - bot.say(byemsg + ' ' + trigger.nick + punctuation) - - -@sopel.module.nickname_commands("bye", "goodbye", "gtg", "seeya", "cya", "ttyl", "g2g", "gnight", "goodnight") -def bot_command_goodbye_b(bot, trigger): - bot_command_goodbye(bot, trigger) - - -@sopel.module.rule(r'(?i)(thank you|thanks),? $nickname[ \t]*$') -def bot_command_thanks(bot, trigger): - bot.reply("You're welcome.") - - -@sopel.module.rule('$nickname thank you') -def bot_command_thanks_b(bot, trigger): - bot_command_thanks(bot, trigger) - - -@sopel.module.nickname_commands('thanks') -def bot_command_thanks_c(bot, trigger): - bot_command_thanks(bot, trigger) - - -@sopel.module.rule('$nickname!') -def exclaim(bot, trigger): - bot.say(trigger.nick + '!') - - -@sopel.module.rule('$nickname\?') -def imhere(bot, trigger): - bot.say("I'm here, " + trigger.nick) - - -@sopel.module.rule(r'(?i)(Fuck|Screw) (you|off),? $nickname[ \t]*$') -def bot_command_srewyou(bot, trigger): - bot.osd("Watch your mouth, " + trigger.nick + ", or I'll tell your mother!") - - -@sopel.module.rule(r'(?i)(Damnit|Lazy)? $nickname[ \t]*$') -def bot_command_damnlazy(bot, trigger): - bot.osd("I do not tell you how to do your job, " + trigger.nick + "!!!") - - -@sopel.module.rule('$nickname is lazy') -def bot_command_damnlazy_b(bot, trigger): - bot.osd("I do not tell you how to do your job, " + trigger.nick + "!!!") - - @sopel.module.nickname_commands('(.*)') def bot_command_nick(bot, trigger): diff --git a/sopel_modules/SpiceBot_AI/AI_Acknowledge.py b/sopel_modules/SpiceBot_AI/AI_Acknowledge.py new file mode 100644 index 0000000..e9e626e --- /dev/null +++ b/sopel_modules/SpiceBot_AI/AI_Acknowledge.py @@ -0,0 +1,15 @@ +# coding=utf-8 + +from __future__ import unicode_literals, absolute_import, division, print_function + +import sopel.module + + +@sopel.module.rule('$nickname!') +def exclaim(bot, trigger): + bot.say(trigger.nick + '!') + + +@sopel.module.rule('$nickname\?') +def imhere(bot, trigger): + bot.say("I'm here, " + trigger.nick) diff --git a/sopel_modules/SpiceBot_AI/AI_Goodbye.py b/sopel_modules/SpiceBot_AI/AI_Goodbye.py new file mode 100644 index 0000000..7f93bef --- /dev/null +++ b/sopel_modules/SpiceBot_AI/AI_Goodbye.py @@ -0,0 +1,19 @@ +# coding=utf-8 + +from __future__ import unicode_literals, absolute_import, division, print_function + +import sopel.module + +import spicemanip + + +@sopel.module.rule(r'(?i)(bye|goodbye|gtg|seeya|cya|ttyl|g2g|gnight|goodnight),? $nickname[ \t]*$') +def bot_command_goodbye(bot, trigger): + byemsg = spicemanip.main(['Bye', 'Goodbye', 'Seeya', 'Auf Wiedersehen', 'Au revoir', 'Ttyl'], "random") + punctuation = spicemanip.main(['!', ''], "random") + bot.say(byemsg + ' ' + trigger.nick + punctuation) + + +@sopel.module.nickname_commands("bye", "goodbye", "gtg", "seeya", "cya", "ttyl", "g2g", "gnight", "goodnight") +def bot_command_goodbye_b(bot, trigger): + bot_command_goodbye(bot, trigger) diff --git a/sopel_modules/SpiceBot_AI/AI_Hello.py b/sopel_modules/SpiceBot_AI/AI_Hello.py new file mode 100644 index 0000000..ee30964 --- /dev/null +++ b/sopel_modules/SpiceBot_AI/AI_Hello.py @@ -0,0 +1,19 @@ +# coding=utf-8 + +from __future__ import unicode_literals, absolute_import, division, print_function + +import sopel.module + +import spicemanip + + +@sopel.module.rule(r'(?i)(hi|hello|hey),? $nickname[ \t]*$') +def bot_command_hello(bot, trigger): + hello = spicemanip.main(['Hi', 'Hey', 'Hello'], "random") + punctuation = spicemanip.main(['', '!', '?'], "random") + bot.osd(hello + ' ' + trigger.nick + punctuation) + + +@sopel.module.nickname_commands('hello', 'hi', 'hey') +def bot_command_hello_b(bot, trigger): + bot_command_hello(bot, trigger) diff --git a/sopel_modules/SpiceBot_AI/AI_InsultHandler.py b/sopel_modules/SpiceBot_AI/AI_InsultHandler.py new file mode 100644 index 0000000..910dd7b --- /dev/null +++ b/sopel_modules/SpiceBot_AI/AI_InsultHandler.py @@ -0,0 +1,10 @@ +# coding=utf-8 + +from __future__ import unicode_literals, absolute_import, division, print_function + +import sopel.module + + +@sopel.module.rule(r'(?i)(Fuck|Screw) (you|off),? $nickname[ \t]*$') +def bot_command_srewyou(bot, trigger): + bot.osd("Watch your mouth, " + trigger.nick + ", or I'll tell your mother!") diff --git a/sopel_modules/SpiceBot_AI/AI_Lazy.py b/sopel_modules/SpiceBot_AI/AI_Lazy.py new file mode 100644 index 0000000..a3385a6 --- /dev/null +++ b/sopel_modules/SpiceBot_AI/AI_Lazy.py @@ -0,0 +1,15 @@ +# coding=utf-8 + +from __future__ import unicode_literals, absolute_import, division, print_function + +import sopel.module + + +@sopel.module.rule(r'(?i)(Damnit|Lazy)? $nickname[ \t]*$') +def bot_command_damnlazy(bot, trigger): + bot.osd("I do not tell you how to do your job, " + trigger.nick + "!!!") + + +@sopel.module.rule('$nickname is lazy') +def bot_command_damnlazy_b(bot, trigger): + bot_command_damnlazy(bot, trigger) diff --git a/sopel_modules/SpiceBot_AI/AI_Thanks.py b/sopel_modules/SpiceBot_AI/AI_Thanks.py new file mode 100644 index 0000000..01f21d1 --- /dev/null +++ b/sopel_modules/SpiceBot_AI/AI_Thanks.py @@ -0,0 +1,20 @@ +# coding=utf-8 + +from __future__ import unicode_literals, absolute_import, division, print_function + +import sopel.module + + +@sopel.module.rule(r'(?i)(thank you|thanks),? $nickname[ \t]*$') +def bot_command_thanks(bot, trigger): + bot.reply("You're welcome.") + + +@sopel.module.rule('$nickname thank you') +def bot_command_thanks_b(bot, trigger): + bot_command_thanks(bot, trigger) + + +@sopel.module.nickname_commands('thanks') +def bot_command_thanks_c(bot, trigger): + bot_command_thanks(bot, trigger) diff --git a/sopel_modules/SpiceBot_AI/__init__.py b/sopel_modules/SpiceBot_AI/__init__.py index b1447b6..ba6da7a 100644 --- a/sopel_modules/SpiceBot_AI/__init__.py +++ b/sopel_modules/SpiceBot_AI/__init__.py @@ -2,6 +2,12 @@ from __future__ import unicode_literals, absolute_import, division, print_function from .AI import * +from .AI_Hello import * +from .AI_Goodbye import * +from .AI_Thanks import * +from .AI_Acknowledge import * +from .AI_Lazy import * +from .AI_InsultHandler import * __author__ = 'Sam Zick' __email__ = 'sam@deathbybandaid.net'