Intégration MongoDB + Fix export et amp
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
import { SlashCommandBuilder, ChatInputCommandInteraction } from 'discord.js'
|
||||
import { useQueue } from 'discord-player'
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('volume')
|
||||
.setDescription('Modifie le volume de la musique.')
|
||||
.addIntegerOption(option => option.setName('volume')
|
||||
.setDescription('Le volume à mettre (%)')
|
||||
.setRequired(true)
|
||||
.setMinValue(1)
|
||||
.setMaxValue(100)),
|
||||
async execute(interaction: ChatInputCommandInteraction) {
|
||||
let volume = interaction.options.getInteger('volume')
|
||||
let queue = useQueue(interaction.guild?.id ?? '')
|
||||
if (!queue) return interaction.followUp({ content: 'Aucune file d\'attente en cours, recherche une musique plutôt !' })
|
||||
|
||||
queue.node.setVolume(volume as number)
|
||||
return await interaction.reply(`Volume modifié à ${volume}% !`)
|
||||
}
|
||||
import { SlashCommandBuilder, ChatInputCommandInteraction } from 'discord.js'
|
||||
import { useQueue } from 'discord-player'
|
||||
|
||||
export default {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('volume')
|
||||
.setDescription('Modifie le volume de la musique.')
|
||||
.addIntegerOption(option => option.setName('volume')
|
||||
.setDescription('Le volume à mettre (%)')
|
||||
.setRequired(true)
|
||||
.setMinValue(1)
|
||||
.setMaxValue(100)),
|
||||
async execute(interaction: ChatInputCommandInteraction) {
|
||||
let volume = interaction.options.getInteger('volume')
|
||||
let queue = useQueue(interaction.guild?.id ?? '')
|
||||
if (!queue) return interaction.followUp({ content: 'Aucune file d\'attente en cours, recherche une musique plutôt !' })
|
||||
|
||||
queue.node.setVolume(volume as number)
|
||||
return await interaction.reply(`Volume modifié à ${volume}% !`)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user