Add countChars function

This commit is contained in:
Chloe Fontenot 🏳️‍⚧️ 2023-04-04 17:48:50 -05:00
parent 102e218540
commit fb35c28294

View File

@ -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");
},
};