bot.exec: i am dumb, classic copypaste coding
This commit is contained in:
parent
263166c84f
commit
49f4c9ad75
1 changed files with 3 additions and 6 deletions
|
@ -28,19 +28,16 @@ function spawn(args) {
|
||||||
stdout: {
|
stdout: {
|
||||||
on: (event, handler) =>
|
on: (event, handler) =>
|
||||||
proc.stdout.on(event, (data) => {
|
proc.stdout.on(event, (data) => {
|
||||||
handler(Buffer.from(data).toString("utf8"));
|
handler(data.toString("utf8"));
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
stderr: {
|
stderr: {
|
||||||
on: (event, handler) =>
|
on: (event, handler) =>
|
||||||
proc.stderr.on(event, (data) => {
|
proc.stderr.on(event, (data) => {
|
||||||
handler(Buffer.from(data).toString("utf8"));
|
handler(data.toString("utf8"));
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
on: (event, handler) =>
|
on: (event, handler) => proc.on(event, handler),
|
||||||
proc.on(event, (data) => {
|
|
||||||
handler(Buffer.from(data).toString("utf8"));
|
|
||||||
}),
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue