mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 12:03:31 +01:00
change error emission logic
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user