bot.exec: i am dumb, classic copypaste coding

This commit is contained in:
Cynthia Foxwell 2021-07-23 17:01:52 -06:00
parent 263166c84f
commit 49f4c9ad75
1 changed files with 3 additions and 6 deletions

View File

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