Added types for subcommands

This commit is contained in:
2025-01-12 19:40:20 +01:00
parent 53914fa9dd
commit 560ad899f8
19 changed files with 81 additions and 42 deletions

View File

@@ -1,8 +1,8 @@
import { useMainPlayer } from "discord-player"
import { ChatInputCommandInteraction } from "discord.js"
import { embedColor } from "~/config/options.js"
import { SubCommand } from "~/typings"
export default async function leave(interaction: ChatInputCommandInteraction) {
const cmd: SubCommand = async (interaction) => {
const player = useMainPlayer()
const queue = player.queues.get(interaction.guildId!)
if (!queue) {
@@ -23,3 +23,5 @@ export default async function leave(interaction: ChatInputCommandInteraction) {
}]
})
}
export default cmd