From 5a2ef0f7adfed2dc1e01b5d4f03ebc443e221408 Mon Sep 17 00:00:00 2001 From: Lightemerald Date: Mon, 26 Jun 2023 10:31:41 +0200 Subject: [PATCH] Added visibility to the type of output (stdout|stderr) --- index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 458c9e7..e18d6ec 100644 --- a/index.js +++ b/index.js @@ -156,8 +156,7 @@ async function startBot(accountName) { }); childProcess.stdout.on('data', (data) => { - console.log('stdout'); - console.log(`[${accountName}] ${data.toString().trim()}`); + console.log(`[${accountName}] STDOUT: ${data.toString().trim()}`); if (data.includes('Press enter') || data.includes('Press any key')) { setTimeout(() => { childProcess.stdin.write('\n'); @@ -166,7 +165,7 @@ async function startBot(accountName) { }); childProcess.stderr.on('data', (data) => { - console.error(`[${accountName}] ${data.toString().trim()}`); + console.error(`[${accountName}] STDERR: ${data.toString().trim()}`); }); childProcess.on('exit', (code) => {