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}\``);