From ed707d1e1cf209c082da3afe5da00ee1d61cea31 Mon Sep 17 00:00:00 2001 From: Canna Wen Date: Wed, 20 Sep 2017 20:48:07 +0200 Subject: [PATCH] Update personality [finish #151116812] --- src/personality.js | 11 ++++++----- test/personality-test.js | 5 ++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/personality.js b/src/personality.js index 20c2156..67626d4 100644 --- a/src/personality.js +++ b/src/personality.js @@ -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 }, @@ -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", @@ -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 diff --git a/test/personality-test.js b/test/personality-test.js index a4b08e3..0f11893 100644 --- a/test/personality-test.js +++ b/test/personality-test.js @@ -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 ¯\_(ツ)_/¯"); }); }); @@ -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"); }); });