From 3527519db1a9e7350062321c36519bd154c241b3 Mon Sep 17 00:00:00 2001 From: Caleb Fontenot Date: Tue, 4 Apr 2023 21:26:00 -0500 Subject: [PATCH] Added /drawtriangle command --- commands/drawTriangle.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/commands/drawTriangle.ts b/commands/drawTriangle.ts index bcb1f7f..f5a684d 100644 --- a/commands/drawTriangle.ts +++ b/commands/drawTriangle.ts @@ -35,12 +35,13 @@ module.exports = { } 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."); return; } - await interaction.reply(codeBlock("", output)); - await interaction.reply('output length was ' + output.length + " characters."); + await interaction.reply(codeBlock("", output) + testLength); + await interaction.reply(); console.log("User " + interaction.user.tag + " ran /drawtriangle"); }, };