From fb35c28294169d28bac9059acf8521ec404ccabd Mon Sep 17 00:00:00 2001 From: Caleb Fontenot Date: Tue, 4 Apr 2023 17:48:50 -0500 Subject: [PATCH] Add countChars function --- commands/countChars.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/countChars.ts b/commands/countChars.ts index 21799a3..4b5601d 100644 --- a/commands/countChars.ts +++ b/commands/countChars.ts @@ -25,9 +25,10 @@ module.exports = { inputString = messagefromId.content; } if (inputString.length > 1000) { - inputString = inputString.length + "characters long"; + inputString = "too long to copy"; } - await interaction.reply("Input: `" + inputString + "`\n" + "Output: " + codeBlock("", countChars(inputString))); + + await interaction.reply("Input: `" + inputString + "`\n" + "input length: " + inputString.length + " characters long" + "\n Output: " + codeBlock("", countChars(inputString))); console.log("User " + interaction.user.tag + " ran /count_chars"); }, };