properly delete queue

This commit is contained in:
Snowflake107 2021-06-13 13:56:54 +05:45
parent b97e8e61fc
commit e611143f58

View file

@ -33,7 +33,12 @@ class DiscordPlayer extends EventEmitter<PlayerEvents> {
deleteQueue<T = unknown>(guild: Snowflake) {
const prev = this.getQueue<T>(guild);
try {
prev.destroy();
} catch {}
this.queues.delete(guild);
return prev;
}