From 102e2185404de7227700976fab7e55e581e4dbdb Mon Sep 17 00:00:00 2001 From: Caleb Fontenot Date: Tue, 4 Apr 2023 17:46:27 -0500 Subject: [PATCH] Add countChars function --- commands/countChars.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commands/countChars.ts b/commands/countChars.ts index e4a31f3..21799a3 100644 --- a/commands/countChars.ts +++ b/commands/countChars.ts @@ -24,7 +24,9 @@ module.exports = { const messagefromId = await client.channels.cache.get(interaction.channel.id).messages.fetch(messageId); inputString = messagefromId.content; } - + if (inputString.length > 1000) { + inputString = inputString.length + "characters long"; + } await interaction.reply("Input: `" + inputString + "`\n" + "Output: " + codeBlock("", countChars(inputString))); console.log("User " + interaction.user.tag + " ran /count_chars"); },