Skip to content

Commit

Permalink
fix: Bot not disconnecting after queue finished
Browse files Browse the repository at this point in the history
Signed-off-by: TannerGabriel <[email protected]>
  • Loading branch information
TannerGabriel committed Feb 13, 2024
1 parent f1b8012 commit 954b24c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit 954b24c

Please sign in to comment.