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