queue: check connection before ending
This commit is contained in:
parent
91c56751a7
commit
5b761308a0
1 changed files with 1 additions and 1 deletions
|
@ -193,7 +193,7 @@ class Queue<T = unknown> {
|
|||
*/
|
||||
destroy(disconnect = this.options.leaveOnStop) {
|
||||
this.#watchDestroyed();
|
||||
this.connection.end();
|
||||
if (this.connection) this.connection.end();
|
||||
if (disconnect) this.connection.disconnect();
|
||||
this.player.queues.delete(this.guild.id);
|
||||
this.player.voiceUtils.cache.delete(this.guild.id);
|
||||
|
|
Loading…
Reference in a new issue