From 49f4c9ad755f8f56a5a232996effcc7b2e52d374 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Fri, 23 Jul 2021 17:01:52 -0600 Subject: [PATCH] bot.exec: i am dumb, classic copypaste coding --- src/modules/bot.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/modules/bot.js b/src/modules/bot.js index a99315a..76b0481 100644 --- a/src/modules/bot.js +++ b/src/modules/bot.js @@ -28,19 +28,16 @@ function spawn(args) { stdout: { on: (event, handler) => proc.stdout.on(event, (data) => { - handler(Buffer.from(data).toString("utf8")); + handler(data.toString("utf8")); }), }, stderr: { on: (event, handler) => proc.stderr.on(event, (data) => { - handler(Buffer.from(data).toString("utf8")); + handler(data.toString("utf8")); }), }, - on: (event, handler) => - proc.on(event, (data) => { - handler(Buffer.from(data).toString("utf8")); - }), + on: (event, handler) => proc.on(event, handler), }; }