From 954b24c0575d709f47c8fa7ce7900771d634948c Mon Sep 17 00:00:00 2001 From: TannerGabriel Date: Tue, 13 Feb 2024 10:05:52 +0100 Subject: [PATCH] fix: Bot not disconnecting after queue finished Signed-off-by: TannerGabriel --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 955e5e44..e1c40601 100644 --- a/index.js +++ b/index.js @@ -6,8 +6,6 @@ const Client = require('./client/Client'); const config = require('./config.json'); const {Player} = require('discord-player'); -const {ActivityType} = require('discord.js'); - const client = new Client(); client.commands = new Discord.Collection(); @@ -62,6 +60,8 @@ player.events.on('emptyChannel', queue => { player.events.on('emptyQueue', queue => { queue.metadata.channel.send('✅ | Queue finished!'); + // Delete queue and disconnect from voice channel + queue.delete(); }); player.events.on('error', (queue, error) => {