19 lines
564 B
JavaScript
Executable File
19 lines
564 B
JavaScript
Executable File
const { SlashCommandBuilder } = require('discord.js')
|
|
const { useQueue } = require('discord-player')
|
|
|
|
module.exports = {
|
|
data: new SlashCommandBuilder()
|
|
.setName('stop')
|
|
.setDescription('Arrêter la musique.'),
|
|
async execute(interaction) {
|
|
let queue = useQueue(interaction.guild.id)
|
|
queue.delete()
|
|
|
|
writeEnv('DISCORD_MUSIC_TEXTCHANNEL_ID', '')
|
|
writeEnv('DISCORD_MUSIC_VOICECHANNEL_ID', '')
|
|
writeEnv('DISCORD_MUSIC_CURRENT_TRACK', '')
|
|
writeEnv('DISCORD_MUSIC_CURRENT_PROGRESS', '')
|
|
|
|
return await interaction.reply('Musique arrêtée !')
|
|
}
|
|
} |