Added music commands

This commit is contained in:
2024-02-09 20:09:27 +01:00
parent d45c9fa299
commit d167e90316
6 changed files with 193 additions and 3 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 leave(interaction: ChatInputCommandInteraction) {
const player = useMainPlayer()
const queue = player.queues.get(interaction.guildId!)
if (!queue) {
await interaction.reply({
embeds: [{
description: "There is no music playing",
color: embedColor
}]
})
return
}
queue.delete()
await interaction.reply({
embeds: [{
description: "Left the voice channel",
color: embedColor
}]
})
}