Update skip.js
This commit is contained in:
parent
4c7e30db45
commit
5fd238ea79
|
@ -1,4 +1,4 @@
|
|||
const { skipTrack } = require('../utils/queueManager');
|
||||
const { skipTrack, getCurrentTrack, getQueue } = require('../utils/queueManager');
|
||||
|
||||
module.exports = {
|
||||
name: 'skip',
|
||||
|
@ -11,6 +11,13 @@ module.exports = {
|
|||
return message.reply('You need to be in a voice channel to skip music!');
|
||||
}
|
||||
|
||||
const currentTrack = getCurrentTrack(guildId);
|
||||
const queue = getQueue(guildId);
|
||||
|
||||
if (!currentTrack && queue.length === 0) {
|
||||
return message.reply('There is no track currently playing or in the queue to skip!');
|
||||
}
|
||||
|
||||
skipTrack(guildId, voiceChannel);
|
||||
message.channel.send('Skipped the current track!');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue