Testing some silly output stuff

This commit is contained in:
Christopher Cookman 2024-03-24 03:53:56 -06:00
parent 03d5d6f98f
commit ff0f9b5c74
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -1162,8 +1162,14 @@ dcClient.on('interactionCreate', async interaction => {
interaction.editReply(`Error running command: ${err}`); interaction.editReply(`Error running command: ${err}`);
sendLog(`${colors.red("[ERROR]")} ${err}`); sendLog(`${colors.red("[ERROR]")} ${err}`);
} }
outputStream = ""
stream.on("data", (data) => { 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) => { stream.on('exit', (code, signal) => {
interaction.editReply(`Ran command \`${cmd}\``); interaction.editReply(`Ran command \`${cmd}\``);