Updated music commands

This commit is contained in:
2024-02-10 12:18:40 +01:00
parent ef6183726f
commit 8f16c65bb8
7 changed files with 93 additions and 6 deletions

View File

@@ -0,0 +1,26 @@
import { embedColor } from "config/options"
import { useMainPlayer } from "discord-player"
import { ChatInputCommandInteraction } from "discord.js"
export default async function volume(interaction: ChatInputCommandInteraction) {
await interaction.deferReply()
const volume = interaction.options.getNumber("volume")!
const player = useMainPlayer()
const queue = player.queues.get(interaction.guildId!)
if (!queue) {
await interaction.editReply({
content: "There is no queue"
})
return
}
queue.node.setVolume(volume)
await interaction.editReply({
embeds: [{
description: `Volume set to ${volume}`,
color: embedColor
}]
})
}