mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
dumb ass bug fix
This commit is contained in:
@@ -74,8 +74,10 @@ class AudioPlayer extends EventEmitter {
|
||||
const dispatcher = this.dispatcher;
|
||||
if (transcoder) transcoder.kill();
|
||||
if (dispatcher) {
|
||||
dispatcher.removeListener('end', dispatcher.listeners('end')[0]);
|
||||
dispatcher.removeListener('error', dispatcher.listeners('error')[0]);
|
||||
const end = dispatcher.listeners('end')[0];
|
||||
const error = dispatcher.listeners('error')[0];
|
||||
if (end) dispatcher.removeListener('end', end);
|
||||
if (error) dispatcher.removeListener('error', error);
|
||||
dispatcher.destroy('end');
|
||||
}
|
||||
this.currentStream = {};
|
||||
|
||||
Reference in New Issue
Block a user