15 lines
589 B
TypeScript
Executable File
15 lines
589 B
TypeScript
Executable File
import { SlashCommandBuilder, ChatInputCommandInteraction } from 'discord.js'
|
|
import { useQueue } from 'discord-player'
|
|
|
|
export default {
|
|
data: new SlashCommandBuilder()
|
|
.setName('shuffle')
|
|
.setDescription('Mélange la file d\'attente.'),
|
|
async execute(interaction: ChatInputCommandInteraction) {
|
|
let queue = useQueue(interaction.guild?.id ?? '')
|
|
if (!queue) return interaction.followUp({ content: 'Aucune file d\'attente en cours, recherche une musique plutôt !' })
|
|
|
|
queue.tracks.shuffle()
|
|
return await interaction.reply('File d\'attente mélangée !')
|
|
}
|
|
} |