mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -05:00
more AI reworking
This commit is contained in:
parent
4fb4e70105
commit
37deaadc8f
@ -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)
|
||||
@ -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!")
|
||||
@ -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)
|
||||
@ -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)
|
||||
@ -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)
|
||||
@ -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)
|
||||
@ -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)
|
||||
@ -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'
|
||||
|
||||
@ -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>
|
||||
|
||||
70
sopel_modules/SpiceBot_Configs/aiml/nickname_hello.aiml
Normal file
70
sopel_modules/SpiceBot_Configs/aiml/nickname_hello.aiml
Normal 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>
|
||||
@ -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>
|
||||
38
sopel_modules/SpiceBot_Configs/aiml/nickname_lazy.aiml
Normal file
38
sopel_modules/SpiceBot_Configs/aiml/nickname_lazy.aiml
Normal 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>
|
||||
44
sopel_modules/SpiceBot_Configs/aiml/nickname_love.aiml
Normal file
44
sopel_modules/SpiceBot_Configs/aiml/nickname_love.aiml
Normal 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>
|
||||
25
sopel_modules/SpiceBot_Configs/aiml/nickname_really.aiml
Normal file
25
sopel_modules/SpiceBot_Configs/aiml/nickname_really.aiml
Normal 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>
|
||||
34
sopel_modules/SpiceBot_Configs/aiml/nickname_thanks.aiml
Normal file
34
sopel_modules/SpiceBot_Configs/aiml/nickname_thanks.aiml
Normal 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>
|
||||
@ -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>
|
||||
Loading…
Reference in New Issue
Block a user