more AI reworking

This commit is contained in:
deathbybandaid 2019-06-05 14:51:59 -04:00
parent 4fb4e70105
commit 37deaadc8f
16 changed files with 337 additions and 142 deletions

View File

@ -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)

View File

@ -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!")

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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'

View File

@ -27,6 +27,45 @@
</template>
</category>
<category>
<pattern>BOTNICK seeya</pattern>
<template>
<random>
<li>bye, triggernick</li>
<li>goodbye, triggernick</li>
<li>seeya, triggernick</li>
<li>cya, triggernick</li>
<li>ttyl, triggernick</li>
</random>
</template>
</category>
<category>
<pattern>BOTNICK cya</pattern>
<template>
<random>
<li>bye, triggernick</li>
<li>goodbye, triggernick</li>
<li>seeya, triggernick</li>
<li>cya, triggernick</li>
<li>ttyl, triggernick</li>
</random>
</template>
</category>
<category>
<pattern>BOTNICK ttyl</pattern>
<template>
<random>
<li>bye, triggernick</li>
<li>goodbye, triggernick</li>
<li>seeya, triggernick</li>
<li>cya, triggernick</li>
<li>ttyl, triggernick</li>
</random>
</template>
</category>
<category>
<pattern>BYE BOTNICK</pattern>
<template>
@ -53,4 +92,43 @@
</template>
</category>
<category>
<pattern>seeya BOTNICK</pattern>
<template>
<random>
<li>bye, triggernick</li>
<li>goodbye, triggernick</li>
<li>seeya, triggernick</li>
<li>cya, triggernick</li>
<li>ttyl, triggernick</li>
</random>
</template>
</category>
<category>
<pattern>cya BOTNICK</pattern>
<template>
<random>
<li>bye, triggernick</li>
<li>goodbye, triggernick</li>
<li>seeya, triggernick</li>
<li>cya, triggernick</li>
<li>ttyl, triggernick</li>
</random>
</template>
</category>
<category>
<pattern>ttyl BOTNICK</pattern>
<template>
<random>
<li>bye, triggernick</li>
<li>goodbye, triggernick</li>
<li>seeya, triggernick</li>
<li>cya, triggernick</li>
<li>ttyl, triggernick</li>
</random>
</template>
</category>
</aiml>

View File

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<aiml version="1.0">
<category>
<pattern>BOTNICK hi</pattern>
<template>
<random>
<li>hi, triggernick</li>
<li>hello, triggernick</li>
<li>hey, triggernick</li>
</random>
</template>
</category>
<category>
<pattern>BOTNICK hello</pattern>
<template>
<random>
<li>hi, triggernick</li>
<li>hello, triggernick</li>
<li>hey, triggernick</li>
</random>
</template>
</category>
<category>
<pattern>BOTNICK hey</pattern>
<template>
<random>
<li>hi, triggernick</li>
<li>hello, triggernick</li>
<li>hey, triggernick</li>
</random>
</template>
</category>
<category>
<pattern>hi BOTNICK</pattern>
<template>
<random>
<li>hi, triggernick</li>
<li>hello, triggernick</li>
<li>hey, triggernick</li>
</random>
</template>
</category>
<category>
<pattern>hello BOTNICK</pattern>
<template>
<random>
<li>hi, triggernick</li>
<li>hello, triggernick</li>
<li>hey, triggernick</li>
</random>
</template>
</category>
<category>
<pattern>hey BOTNICK</pattern>
<template>
<random>
<li>hi, triggernick</li>
<li>hello, triggernick</li>
<li>hey, triggernick</li>
</random>
</template>
</category>
</aiml>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<aiml version="1.0">
<category>
<pattern>BOTNICK fuck you</pattern>
<template>Watch your mouth, triggernick, or I'll tell your mother!</template>
</category>
<category>
<pattern>BOTNICK fuck off</pattern>
<template>Watch your mouth, triggernick, or I'll tell your mother!</template>
</category>
<category>
<pattern>BOTNICK screw you</pattern>
<template>Watch your mouth, triggernick, or I'll tell your mother!</template>
</category>
<category>
<pattern>fuck you BOTNICK</pattern>
<template>Watch your mouth, triggernick, or I'll tell your mother!</template>
</category>
<category>
<pattern>fuck off BOTNICK</pattern>
<template>Watch your mouth, triggernick, or I'll tell your mother!</template>
</category>
<category>
<pattern>screw you BOTNICK</pattern>
<template>Watch your mouth, triggernick, or I'll tell your mother!</template>
</category>
</aiml>

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<aiml version="1.0">
<category>
<pattern>BOTNICK IS LAZY</pattern>
<template>
<random>
<li>hi, triggernick</li>
<li>hello, triggernick</li>
<li>hey, triggernick</li>
</random>
</template>
</category>
<category>
<pattern>LAZY BOTNICK</pattern>
<template>
<random>
<li>hi, triggernick</li>
<li>hello, triggernick</li>
<li>hey, triggernick</li>
</random>
</template>
</category>
<category>
<pattern>DAMNIT BOTNICK</pattern>
<template>
<random>
<li>hi, triggernick</li>
<li>hello, triggernick</li>
<li>hey, triggernick</li>
</random>
</template>
</category>
</aiml>

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<aiml version="1.0">
<category>
<pattern>BOTNICK I love you</pattern>
<template>triggernick, I love you too.</template>
</category>
<category>
<pattern>BOTNICK loveya</pattern>
<template>triggernick, I love you too.</template>
</category>
<category>
<pattern>BOTNICK I love you</pattern>
<template>triggernick, I love you too.</template>
</category>
<category>
<pattern>BOTNICK I like you</pattern>
<template>triggernick, I like you too.</template>
</category>
<category>
<pattern>I love you BOTNICK</pattern>
<template>triggernick, I love you too.</template>
</category>
<category>
<pattern>loveya BOTNICK</pattern>
<template>triggernick, I love you too.</template>
</category>
<category>
<pattern>I love BOTNICK</pattern>
<template>triggernick, I love you too.</template>
</category>
<category>
<pattern>I like BOTNICK</pattern>
<template>triggernick, I like you too.</template>
</category>
</aiml>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<aiml version="1.0">
<category>
<pattern>BOTNICK really</pattern>
<template>
<random>
<li>triggernick, Yes, really.</li>
<li>triggernick, Really really</li>
</random>
</template>
</category>
<category>
<pattern>really BOTNICK</pattern>
<template>
<random>
<li>triggernick, Yes, really.</li>
<li>triggernick, Really really</li>
</random>
</template>
</category>
</aiml>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<aiml version="1.0">
<category>
<pattern>thank you BOTNICK</pattern>
<template>triggernick, I like you too.</template>
</category>
<category>
<pattern>BOTNICK thank you</pattern>
<template>triggernick, I like you too.</template>
</category>
<category>
<pattern>thanks BOTNICK</pattern>
<template>triggernick, I like you too.</template>
</category>
<category>
<pattern>BOTNICK thanks</pattern>
<template>triggernick, I like you too.</template>
</category>
<category>
<pattern>thankya BOTNICK</pattern>
<template>triggernick, I like you too.</template>
</category>
<category>
<pattern>BOTNICK thankya</pattern>
<template>triggernick, I like you too.</template>
</category>
</aiml>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<aiml version="1.0">
<category>
<pattern>BOTNICK welcome back</pattern>
<template>Thanks!</template>
</category>
<category>
<pattern>welcome back BOTNICK</pattern>
<template>Thanks!</template>
</category>
</aiml>