mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 06:59:53 -05:00
test
This commit is contained in:
parent
4dfaf106f5
commit
8457d358d1
@ -89,6 +89,9 @@ class SpiceBot_AI():
|
|||||||
return aiml_response
|
return aiml_response
|
||||||
|
|
||||||
def bot_message_precipher(self, bot, trigger, message):
|
def bot_message_precipher(self, bot, trigger, message):
|
||||||
|
puct_dict = {"!": "exclamationmark", ".": "period", "?": "questionmark", ",": "comma"}
|
||||||
|
for puctuation in puct_dict.keys():
|
||||||
|
message = message.replace(puctuation, puct_dict[puctuation])
|
||||||
for botitem in ["nick"]:
|
for botitem in ["nick"]:
|
||||||
message = message.replace(str(eval("bot." + botitem)), "bot" + botitem)
|
message = message.replace(str(eval("bot." + botitem)), "bot" + botitem)
|
||||||
for triggeritem in ["nick", "sender"]:
|
for triggeritem in ["nick", "sender"]:
|
||||||
|
|||||||
@ -2,18 +2,18 @@
|
|||||||
<aiml version="1.0">
|
<aiml version="1.0">
|
||||||
|
|
||||||
<category>
|
<category>
|
||||||
<pattern>BOTNICK!</pattern>
|
<pattern>BOTNICKexclamationmark</pattern>
|
||||||
<template>triggernick!</template>
|
<template>triggernick!</template>
|
||||||
</category>
|
</category>
|
||||||
|
|
||||||
|
<category>
|
||||||
|
<pattern>BOTNICKquestionmark</pattern>
|
||||||
|
<template>That's my name, don't wear it out!</template>
|
||||||
|
</category>
|
||||||
|
|
||||||
<category>
|
<category>
|
||||||
<pattern>BOTNICK</pattern>
|
<pattern>BOTNICK</pattern>
|
||||||
<template>
|
<template>I'm here, triggernick</template>
|
||||||
<random>
|
|
||||||
<li>That's my name, don't wear it out!</li>
|
|
||||||
<li>I'm here, triggernick</li>
|
|
||||||
</random>
|
|
||||||
</template>
|
|
||||||
</category>
|
</category>
|
||||||
|
|
||||||
</aiml>
|
</aiml>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user