From 3fd075190f42e0b431c41b9e4f3bd9f57d54f345 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Sun, 18 Feb 2018 16:52:53 +0000 Subject: [PATCH] Make temmie better --- commands/text-edit/temmie.js | 11 +++++++++-- package.json | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/commands/text-edit/temmie.js b/commands/text-edit/temmie.js index 7b059ee7..b8c5a36f 100644 --- a/commands/text-edit/temmie.js +++ b/commands/text-edit/temmie.js @@ -16,7 +16,7 @@ module.exports = class TemmieCommand extends Command { prompt: 'What text would you like to convert to Temmie speak?', type: 'string', validate: text => { - if (wordTrans(text, dictionary).length < 2000) return true; + if (this.temmize(text).length < 2000) return true; return 'Invalid text, your text is too long.'; } } @@ -25,6 +25,13 @@ module.exports = class TemmieCommand extends Command { } run(msg, { text }) { - return msg.say(wordTrans(text, dictionary)); + return msg.say(this.temmize(text)); + } + + temmize(text) { + return wordTrans(text, dictionary) + .replace(/ing/gi, 'in') + .replace(/!/g, '!!!!111!1!') + .replace(/'/g, ''); } }; diff --git a/package.json b/package.json index 9c7062e9..a8c5beac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "65.1.0", + "version": "65.1.1", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {