Réécriture complète en Typescript

This commit is contained in:
Angels-dev
2024-01-14 22:53:06 +01:00
parent 6ffa521888
commit 07d54abdba
108 changed files with 2477 additions and 1943 deletions

15
src/commands/player/shuffle.ts Executable file
View File

@@ -0,0 +1,15 @@
import { SlashCommandBuilder, ChatInputCommandInteraction } from 'discord.js'
import { useQueue } from 'discord-player'
module.exports = {
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 !')
}
}