From 6f7989889e41e5bfca94a59dabbfc64367e1fb7a Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Sat, 11 May 2019 17:02:16 -0400 Subject: [PATCH] true love --- sopel_modules/SpiceBot_AI/AI_Love.py | 20 ++++++++++++++++++++ sopel_modules/SpiceBot_AI/__init__.py | 1 + 2 files changed, 21 insertions(+) create mode 100644 sopel_modules/SpiceBot_AI/AI_Love.py diff --git a/sopel_modules/SpiceBot_AI/AI_Love.py b/sopel_modules/SpiceBot_AI/AI_Love.py new file mode 100644 index 0000000..66cd4f3 --- /dev/null +++ b/sopel_modules/SpiceBot_AI/AI_Love.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)(I love you|loveya),? $nickname[ \t]*$') +def bot_command_love(bot, trigger): + bot.reply("You're welcome.") + + +@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) diff --git a/sopel_modules/SpiceBot_AI/__init__.py b/sopel_modules/SpiceBot_AI/__init__.py index 18cca3e..93aecc7 100644 --- a/sopel_modules/SpiceBot_AI/__init__.py +++ b/sopel_modules/SpiceBot_AI/__init__.py @@ -9,6 +9,7 @@ from .AI_Acknowledge import * from .AI_Lazy import * from .AI_InsultHandler import * from .AI_Ping import * +from .AI_Love import * __author__ = 'Sam Zick' __email__ = 'sam@deathbybandaid.net'