const {SlashCommandBuilder} = require("@discordjs/builders"); const { MessageEmbed } = require("discord.js"); module.exports = { data: new SlashCommandBuilder() .setName("skip") .setDescription("Skips the current tune"), execute: async ({client, interaction}) => { // Get the queue for the server const queue = client.player.getQueue(interaction.guild); // If there is no queue, return if (!queue){ await interaction.reply("There are no tunes in the queue"); return; } const currentSong = queue.current; // Skip the current tune queue.skip(); // Return an embed to the user saying the tune has been skipped await interaction.reply({ embeds: [ new MessageEmbed() .setDescription(`${currentSong.title} has been skipped!`) .setThumbnail(currentSong.thumbnail) ] }) } }