From 37deaadc8fda3c419fd92aa6a658fc05c7754dbf Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Wed, 5 Jun 2019 14:51:59 -0400 Subject: [PATCH] more AI reworking --- sopel_modules/SpiceBot_AI/AI_Hello.py | 19 ----- sopel_modules/SpiceBot_AI/AI_InsultHandler.py | 10 --- sopel_modules/SpiceBot_AI/AI_Lazy.py | 15 ---- sopel_modules/SpiceBot_AI/AI_Love.py | 40 ---------- sopel_modules/SpiceBot_AI/AI_Really.py | 18 ----- sopel_modules/SpiceBot_AI/AI_Thanks.py | 20 ----- sopel_modules/SpiceBot_AI/AI_Welcomeback.py | 13 ---- sopel_modules/SpiceBot_AI/__init__.py | 7 -- .../aiml/nickname_goodbye.aiml | 78 +++++++++++++++++++ .../SpiceBot_Configs/aiml/nickname_hello.aiml | 70 +++++++++++++++++ .../aiml/nickname_insulthandler.aiml | 34 ++++++++ .../SpiceBot_Configs/aiml/nickname_lazy.aiml | 38 +++++++++ .../SpiceBot_Configs/aiml/nickname_love.aiml | 44 +++++++++++ .../aiml/nickname_really.aiml | 25 ++++++ .../aiml/nickname_thanks.aiml | 34 ++++++++ .../aiml/nickname_welcomeback.aiml | 14 ++++ 16 files changed, 337 insertions(+), 142 deletions(-) delete mode 100644 sopel_modules/SpiceBot_AI/AI_Hello.py delete mode 100644 sopel_modules/SpiceBot_AI/AI_InsultHandler.py delete mode 100644 sopel_modules/SpiceBot_AI/AI_Lazy.py delete mode 100644 sopel_modules/SpiceBot_AI/AI_Love.py delete mode 100644 sopel_modules/SpiceBot_AI/AI_Really.py delete mode 100644 sopel_modules/SpiceBot_AI/AI_Thanks.py delete mode 100644 sopel_modules/SpiceBot_AI/AI_Welcomeback.py create mode 100644 sopel_modules/SpiceBot_Configs/aiml/nickname_hello.aiml create mode 100644 sopel_modules/SpiceBot_Configs/aiml/nickname_insulthandler.aiml create mode 100644 sopel_modules/SpiceBot_Configs/aiml/nickname_lazy.aiml create mode 100644 sopel_modules/SpiceBot_Configs/aiml/nickname_love.aiml create mode 100644 sopel_modules/SpiceBot_Configs/aiml/nickname_really.aiml create mode 100644 sopel_modules/SpiceBot_Configs/aiml/nickname_thanks.aiml create mode 100644 sopel_modules/SpiceBot_Configs/aiml/nickname_welcomeback.aiml diff --git a/sopel_modules/SpiceBot_AI/AI_Hello.py b/sopel_modules/SpiceBot_AI/AI_Hello.py deleted file mode 100644 index ee30964..0000000 --- a/sopel_modules/SpiceBot_AI/AI_Hello.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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 deleted file mode 100644 index 910dd7b..0000000 --- a/sopel_modules/SpiceBot_AI/AI_InsultHandler.py +++ /dev/null @@ -1,10 +0,0 @@ -# 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 deleted file mode 100644 index a3385a6..0000000 --- a/sopel_modules/SpiceBot_AI/AI_Lazy.py +++ /dev/null @@ -1,15 +0,0 @@ -# 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_Love.py b/sopel_modules/SpiceBot_AI/AI_Love.py deleted file mode 100644 index c43361c..0000000 --- a/sopel_modules/SpiceBot_AI/AI_Love.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 - -from __future__ import unicode_literals, absolute_import, division, print_function - -import sopel.module - - -@sopel.module.rule(r'(?i)(I love you|loveya),? $nickname[ \t]*$') -def bot_command_love(bot, trigger): - bot.osd(trigger.nick + ", I love you too.") - - -@sopel.module.rule('$nickname (loveya|I love you)') -def bot_command_love_b(bot, trigger): - bot_command_love(bot, trigger) - - -@sopel.module.nickname_commands('loveya') -def bot_command_love_c(bot, trigger): - bot_command_love(bot, trigger) - - -@sopel.module.rule('(I love) $nickname') -def bot_command_love_d(bot, trigger): - bot_command_like(bot, trigger) - - -@sopel.module.rule(r'(?i)(I like you),? $nickname[ \t]*$') -def bot_command_like(bot, trigger): - bot.osd(trigger.nick + ", I like you too.") - - -@sopel.module.rule('$nickname (I like you)') -def bot_command_like_b(bot, trigger): - bot_command_like(bot, trigger) - - -@sopel.module.rule('(I like) $nickname') -def bot_command_like_c(bot, trigger): - bot_command_like(bot, trigger) diff --git a/sopel_modules/SpiceBot_AI/AI_Really.py b/sopel_modules/SpiceBot_AI/AI_Really.py deleted file mode 100644 index 162b828..0000000 --- a/sopel_modules/SpiceBot_AI/AI_Really.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 - -from __future__ import unicode_literals, absolute_import, division, print_function - -import sopel.module - -import spicemanip - - -@sopel.module.rule(r'(?i)(really),? $nickname\?') -def bot_command_really(bot, trigger): - really = spicemanip.main(["Yes, really.", "Really really"], "random") - bot.osd(trigger.nick + ", " + really) - - -@sopel.module.rule('$nickname really\?') -def bot_command_really_b(bot, trigger): - bot_command_really(bot, trigger) diff --git a/sopel_modules/SpiceBot_AI/AI_Thanks.py b/sopel_modules/SpiceBot_AI/AI_Thanks.py deleted file mode 100644 index 8babea3..0000000 --- a/sopel_modules/SpiceBot_AI/AI_Thanks.py +++ /dev/null @@ -1,20 +0,0 @@ -# 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.osd(trigger.nick + ",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/AI_Welcomeback.py b/sopel_modules/SpiceBot_AI/AI_Welcomeback.py deleted file mode 100644 index b81f42c..0000000 --- a/sopel_modules/SpiceBot_AI/AI_Welcomeback.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 - -from __future__ import unicode_literals, absolute_import, division, print_function - -import sopel.module - -import spicemanip - - -@sopel.module.rule(r'(?i)(welcome back),? $nickname\?') -def bot_command_really(bot, trigger): - reply = spicemanip.main(['Thank you', 'thanks'], "random") - bot.osd(trigger.nick + ", " + reply) diff --git a/sopel_modules/SpiceBot_AI/__init__.py b/sopel_modules/SpiceBot_AI/__init__.py index a5f1f17..683ec02 100644 --- a/sopel_modules/SpiceBot_AI/__init__.py +++ b/sopel_modules/SpiceBot_AI/__init__.py @@ -3,13 +3,6 @@ from __future__ import unicode_literals, absolute_import, division, print_functi from .AI import * from .AI_aiml import * -from .AI_Hello import * -from .AI_Thanks import * -from .AI_Lazy import * -from .AI_InsultHandler import * -from .AI_Love import * -from .AI_Really import * -from .AI_Welcomeback import * __author__ = 'Sam Zick' __email__ = 'sam@deathbybandaid.net' diff --git a/sopel_modules/SpiceBot_Configs/aiml/nickname_goodbye.aiml b/sopel_modules/SpiceBot_Configs/aiml/nickname_goodbye.aiml index 6234ef0..9835bb2 100644 --- a/sopel_modules/SpiceBot_Configs/aiml/nickname_goodbye.aiml +++ b/sopel_modules/SpiceBot_Configs/aiml/nickname_goodbye.aiml @@ -27,6 +27,45 @@ + + BOTNICK seeya + + + + + BOTNICK cya + + + + + BOTNICK ttyl + + + BYE BOTNICK + + seeya BOTNICK + + + + + cya BOTNICK + + + + + ttyl BOTNICK + + + diff --git a/sopel_modules/SpiceBot_Configs/aiml/nickname_hello.aiml b/sopel_modules/SpiceBot_Configs/aiml/nickname_hello.aiml new file mode 100644 index 0000000..09876b9 --- /dev/null +++ b/sopel_modules/SpiceBot_Configs/aiml/nickname_hello.aiml @@ -0,0 +1,70 @@ + + + + + BOTNICK hi + + + + + BOTNICK hello + + + + + BOTNICK hey + + + + + hi BOTNICK + + + + + hello BOTNICK + + + + + hey BOTNICK + + + + diff --git a/sopel_modules/SpiceBot_Configs/aiml/nickname_insulthandler.aiml b/sopel_modules/SpiceBot_Configs/aiml/nickname_insulthandler.aiml new file mode 100644 index 0000000..25c37ac --- /dev/null +++ b/sopel_modules/SpiceBot_Configs/aiml/nickname_insulthandler.aiml @@ -0,0 +1,34 @@ + + + + + BOTNICK fuck you + + + + + BOTNICK fuck off + + + + + BOTNICK screw you + + + + + fuck you BOTNICK + + + + + fuck off BOTNICK + + + + + screw you BOTNICK + + + + diff --git a/sopel_modules/SpiceBot_Configs/aiml/nickname_lazy.aiml b/sopel_modules/SpiceBot_Configs/aiml/nickname_lazy.aiml new file mode 100644 index 0000000..854221a --- /dev/null +++ b/sopel_modules/SpiceBot_Configs/aiml/nickname_lazy.aiml @@ -0,0 +1,38 @@ + + + + + BOTNICK IS LAZY + + + + + + LAZY BOTNICK + + + + + DAMNIT BOTNICK + + + + diff --git a/sopel_modules/SpiceBot_Configs/aiml/nickname_love.aiml b/sopel_modules/SpiceBot_Configs/aiml/nickname_love.aiml new file mode 100644 index 0000000..cf8fde8 --- /dev/null +++ b/sopel_modules/SpiceBot_Configs/aiml/nickname_love.aiml @@ -0,0 +1,44 @@ + + + + + BOTNICK I love you + + + + + BOTNICK loveya + + + + + BOTNICK I love you + + + + + BOTNICK I like you + + + + + I love you BOTNICK + + + + + loveya BOTNICK + + + + + I love BOTNICK + + + + + I like BOTNICK + + + + diff --git a/sopel_modules/SpiceBot_Configs/aiml/nickname_really.aiml b/sopel_modules/SpiceBot_Configs/aiml/nickname_really.aiml new file mode 100644 index 0000000..0847dd6 --- /dev/null +++ b/sopel_modules/SpiceBot_Configs/aiml/nickname_really.aiml @@ -0,0 +1,25 @@ + + + + + BOTNICK really + + + + + really BOTNICK + + + + + diff --git a/sopel_modules/SpiceBot_Configs/aiml/nickname_thanks.aiml b/sopel_modules/SpiceBot_Configs/aiml/nickname_thanks.aiml new file mode 100644 index 0000000..dcdd7bc --- /dev/null +++ b/sopel_modules/SpiceBot_Configs/aiml/nickname_thanks.aiml @@ -0,0 +1,34 @@ + + + + + thank you BOTNICK + + + + + BOTNICK thank you + + + + + thanks BOTNICK + + + + + BOTNICK thanks + + + + + thankya BOTNICK + + + + + BOTNICK thankya + + + + diff --git a/sopel_modules/SpiceBot_Configs/aiml/nickname_welcomeback.aiml b/sopel_modules/SpiceBot_Configs/aiml/nickname_welcomeback.aiml new file mode 100644 index 0000000..4c10348 --- /dev/null +++ b/sopel_modules/SpiceBot_Configs/aiml/nickname_welcomeback.aiml @@ -0,0 +1,14 @@ + + + + + BOTNICK welcome back + + + + + welcome back BOTNICK + + + +