mirror of
https://github.com/danbulant/discord.js
synced 2026-06-08 17:21:31 +00:00
change error emission logic
This commit is contained in:
parent
e1d01ed6a2
commit
627a8870f5
1 changed files with 1 additions and 1 deletions
|
|
@ -61,7 +61,7 @@ class AudioPlayer extends EventEmitter {
|
||||||
transcoder.on('error', e => {
|
transcoder.on('error', e => {
|
||||||
this.destroyStream(stream);
|
this.destroyStream(stream);
|
||||||
if (this.listenerCount('error') > 0) this.emit('error', e);
|
if (this.listenerCount('error') > 0) this.emit('error', e);
|
||||||
else this.emit('warn', e);
|
this.emit('warn', `prism transcoder error - ${e}`);
|
||||||
});
|
});
|
||||||
return this.playPCMStream(transcoder.output, options);
|
return this.playPCMStream(transcoder.output, options);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue