From ff0f9b5c74bdd03400593f9262843f77ad9d2dc6 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Sun, 24 Mar 2024 03:53:56 -0600 Subject: [PATCH] Testing some silly output stuff --- index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 389896d..e2e5faa 100644 --- a/index.js +++ b/index.js @@ -1162,8 +1162,14 @@ dcClient.on('interactionCreate', async interaction => { interaction.editReply(`Error running command: ${err}`); sendLog(`${colors.red("[ERROR]")} ${err}`); } + outputStream = "" stream.on("data", (data) => { - console.log("DATA: " + data); + outputStream += `${data}\n` + clearTimeout(outputTimeout); + outputTimeout = setTimeout(() => { + interaction.editReply(`\`\`\`ansi\n${outputStream}\`\`\``); + + }, 150); }) stream.on('exit', (code, signal) => { interaction.editReply(`Ran command \`${cmd}\``);