From e37763bae86e6d7f885e61ee04249eaeeabc986a Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 28 Mar 2021 16:36:55 -0400 Subject: [PATCH] Cut less of the string off --- commands/voice/animalese.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/voice/animalese.js b/commands/voice/animalese.js index fee535f1..3ad9b2dc 100644 --- a/commands/voice/animalese.js +++ b/commands/voice/animalese.js @@ -107,8 +107,8 @@ module.exports = class AnimaleseCommand extends Command { } shortenWord(str) { - if (str.length > 1) { - return str[0] + str[str.length - 1]; + if (str.length > 4) { + return `${str.charAt(0)}${str.charAt(1)}${str.charAt(str.length - 2)}${str.charAt(str.length - 1)}`; } return str; }