mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 13:02:38 +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 => {
|
||||
this.destroyStream(stream);
|
||||
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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue