Skip to content

Commit

Permalink
Merge pull request #273 from TannerGabriel/fix/disconnect-problem
Browse files Browse the repository at this point in the history
fix: Bot not disconnecting after queue finished
  • Loading branch information
TannerGabriel committed Feb 13, 2024
2 parents f1b8012 + 954b24c commit cf3ae68
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 cf3ae68

Please sign in to comment.