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), }; }