Make temmie better

This commit is contained in:
Daniel Odendahl Jr
2018-02-18 16:52:53 +00:00
parent d3560d42e6
commit 3fd075190f
2 changed files with 10 additions and 3 deletions
+9 -2
View File
@@ -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, '');
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "65.1.0",
"version": "65.1.1",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {