Added /drawtriangle command

master
Chloe Fontenot 🏳️‍⚧️ 2023-04-04 21:26:00 +07:00
parent 20926916dd
commit 3527519db1
1 changed files with 4 additions and 3 deletions

@ -35,12 +35,13 @@ module.exports = {
} }
console.log(codeBlock("", output)); console.log(codeBlock("", output));
if (output.length > 2000) { var testLength = "\n" + 'output length was ' + output.length + " characters.";
if (output.length + testLength.length > 2000) {
await interaction.reply('Error: String is too big. Resultant output would be too big to send to Discord. (the output length was ' + output.length + " characters."); await interaction.reply('Error: String is too big. Resultant output would be too big to send to Discord. (the output length was ' + output.length + " characters.");
return; return;
} }
await interaction.reply(codeBlock("", output)); await interaction.reply(codeBlock("", output) + testLength);
await interaction.reply('output length was ' + output.length + " characters."); await interaction.reply();
console.log("User " + interaction.user.tag + " ran /drawtriangle"); console.log("User " + interaction.user.tag + " ran /drawtriangle");
}, },
}; };