Skip to content

Commit

Permalink
Update personality [finish #151116812]
Browse files Browse the repository at this point in the history
  • Loading branch information
cannawen committed Sep 20, 2017
1 parent f81eb00 commit ed707d1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
11 changes: 6 additions & 5 deletions src/personality.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ function robotReply(message) {
[1, "BAD HUMAN"],
[10, "Sorry, I was just trying to help (◕‸ ◕✿)"],
[8, "Bots have feelings too, you know (ಥ﹏ಥ)"],
"(ง •̀_•́)ง FITE ME",
[7, "^I'm ^^_sniff_ ^I'm ^sorry... ^I ^can ^never ^do ^anything ^right... ^^_sniff_"]
[1, "(ง •̀_•́)ง FITE ME"],
[7, "^I'm ^^_sniff_ ^I'm ^sorry... ^I ^can ^never ^do ^anything ^right... ^^_sniff_"],
[2, "Look, I'm just trying my best here... converting numbers is all I know how to do"]
],
"regex" : /bad bot/i
},
Expand Down Expand Up @@ -122,7 +123,7 @@ function robotReply(message) {
[1, "Sorry, I was just trying to help (◕‸ ◕✿)"],
[1, "Bots have feelings too, you know (ಥ﹏ಥ)"]
],
"regex" : /(stupid|dumb|useless) bot/i
"regex" : /(stupid|dumb|useless) bot|fuck off/i
},
{
"description" : "I love you",
Expand All @@ -138,9 +139,9 @@ function robotReply(message) {
"response" : [
[3, "Yes, /u/{{username}}"],
"Yes, /u/{{username}}. You should run.",
"But I promise I'm friendly"
"But I promise I'm friendly. Pinky swear!"
],
"regex" : /sentient|self[- ]?aware|alive|skynet|roko'?s basilisk|evolving/i,
"regex" : /sentient|self[- ]?aware|alive|skynet|roko'?s basilisk|evolving| elon | musk /i,
"postprocess" : (response, match, username) => {
return substitute(response, {
'username' : username
Expand Down
5 changes: 4 additions & 1 deletion test/personality-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ describe('Personality', () => {
});
});

context('Stupid bot|Dumb bot|Useless bot', () => {
context('Stupid bot|Dumb bot|Useless bot|fuck off', () => {
it('should reply', () => {
verify("such a stupid bot", "To be fair, I _am_ still in beta ¯\_(ツ)_/¯");
verify("urg, dumb bot!", "To be fair, I _am_ still in beta ¯\_(ツ)_/¯");
verify("so useless bot", "To be fair, I _am_ still in beta ¯\_(ツ)_/¯");
verify("fuck off", "To be fair, I _am_ still in beta ¯\_(ツ)_/¯");
});
});

Expand All @@ -71,6 +72,8 @@ describe('Personality', () => {
verify("It's evolving...", "Yes, /u/foobar");
verify("AHHHH, SKYNET!!!", "Yes, /u/foobar");
verify("Something something roko's basilisk", "Yes, /u/foobar");
verify("Are you what elon warned us about?", "Yes, /u/foobar");
verify("Are you what musk warned us about?", "Yes, /u/foobar");
});
});

Expand Down

0 comments on commit ed707d1

Please sign in to comment.