first commit

This commit is contained in:
2025-06-21 15:13:58 -05:00
commit 07f75bbd93
37 changed files with 3125 additions and 0 deletions

36
commands/music/queue.js Normal file
View File

@ -0,0 +1,36 @@
const { Client, Interaction, SlashCommandBuilder, EmbedBuilder } = require('discord.js')
const { queue } = require('./../../playback')
const { musicQueueEmbed } = require('../../embeds/queue');
async function checkQueue(interaction) {
if (!queue || queue.length === 0 ) {
interaction.reply('The queue is empty.')
return
}
try {
const embed = musicQueueEmbed(queue);
await interaction.reply({ embeds: [embed] })
} catch (error) {
console.log('There is an error in the queue command: ', error)
}
}
module.exports = {
data: new SlashCommandBuilder()
.setName('queue')
.setDescription('Check the playback queue'),
async execute(interaction) {
const voiceChannel = interaction.member.voice.channel
const textChannel = interaction.textChannel
if (!voiceChannel) {
return interaction.reply({
content: 'You need to be in a voice channel to use that queue',
ephemeral: true
})
}
await checkQueue(interaction, voiceChannel, textChannel)
}
}