mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 09:33:32 +01:00
Better ending
This commit is contained in:
@@ -103,10 +103,11 @@ class StreamDispatcher extends Writable {
|
||||
|
||||
destroy() {
|
||||
if (this.player.dispatcher !== this) return;
|
||||
this.player.dispatcher = null;
|
||||
const streams = this.player.streams;
|
||||
this.end();
|
||||
if (streams.opus) streams.opus.unpipe(this);
|
||||
if (streams.ffmpeg) streams.ffmpeg.destroy();
|
||||
this.end();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user