DZ-Musicbot/commands/skip.js

17 lines
498 B
JavaScript
Raw Normal View History

const { skipTrack } = require('../utils/queueManager');
2024-08-17 11:11:10 -04:00
module.exports = {
name: 'skip',
2024-08-17 15:20:51 -04:00
description: 'Skip the current track',
2024-08-17 11:11:10 -04:00
execute(message) {
2024-08-17 11:23:30 -04:00
const guildId = message.guild.id;
const voiceChannel = message.member.voice.channel;
2024-08-17 11:23:30 -04:00
if (!voiceChannel) {
return message.reply('You need to be in a voice channel to skip music!');
2024-08-17 11:23:30 -04:00
}
2024-08-17 14:58:17 -04:00
skipTrack(guildId, voiceChannel);
message.channel.send('Skipped the current track!');
2024-08-17 11:11:10 -04:00
}
2024-08-17 11:23:30 -04:00
};