mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 05:52:05 +00:00
dumb ass bug fix
This commit is contained in:
parent
1a69331f0c
commit
ee37d859a4
1 changed files with 4 additions and 2 deletions
|
|
@ -74,8 +74,10 @@ class AudioPlayer extends EventEmitter {
|
||||||
const dispatcher = this.dispatcher;
|
const dispatcher = this.dispatcher;
|
||||||
if (transcoder) transcoder.kill();
|
if (transcoder) transcoder.kill();
|
||||||
if (dispatcher) {
|
if (dispatcher) {
|
||||||
dispatcher.removeListener('end', dispatcher.listeners('end')[0]);
|
const end = dispatcher.listeners('end')[0];
|
||||||
dispatcher.removeListener('error', dispatcher.listeners('error')[0]);
|
const error = dispatcher.listeners('error')[0];
|
||||||
|
if (end) dispatcher.removeListener('end', end);
|
||||||
|
if (error) dispatcher.removeListener('error', error);
|
||||||
dispatcher.destroy('end');
|
dispatcher.destroy('end');
|
||||||
}
|
}
|
||||||
this.currentStream = {};
|
this.currentStream = {};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue