Testing some silly output stuff
This commit is contained in:
parent
03d5d6f98f
commit
ff0f9b5c74
8
index.js
8
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}\``);
|
||||
|
|
Loading…
Reference in a new issue