18 lines
699 B
TypeScript
18 lines
699 B
TypeScript
import { SlashCommandBuilder } from "discord.js";
|
|
import type { CommandModule } from "../../discord/types.js";
|
|
import { musicPlayer } from "../../services/music/music-player.js";
|
|
|
|
export const queueCommand: CommandModule = {
|
|
data: new SlashCommandBuilder().setName("queue").setDescription("현재 음악 대기열을 보여줍니다"),
|
|
async execute(interaction) {
|
|
if (!interaction.guildId) return;
|
|
const queue = musicPlayer.list(interaction.guildId);
|
|
if (queue.length === 0) {
|
|
await interaction.reply("대기열이 비어 있습니다.");
|
|
return;
|
|
}
|
|
const lines = queue.slice(0, 10);
|
|
await interaction.reply(`현재 대기열:\n${lines.join("\n")}`);
|
|
},
|
|
};
|