28 lines
682 B
TypeScript
28 lines
682 B
TypeScript
import { useMainPlayer } from "discord-player"
|
|
import { embedColor } from "~/config/options.js"
|
|
import { SubCommand } from "~/typings"
|
|
|
|
const cmd: SubCommand = async (interaction) => {
|
|
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
|
|
}]
|
|
})
|
|
}
|
|
|
|
export default cmd
|