import { ChatInputCommandInteraction, MessageFlags, SlashCommandBuilder, } from "discord.js"; import { defineCommand } from "../command"; import { skipCurrentVoice } from "../tts"; export default defineCommand( new SlashCommandBuilder() .setName("스킵") .setDescription("실행중인 보이스를 건너뜁니다"), async (interaction: ChatInputCommandInteraction): Promise => { await interaction.deferReply({ flags: [MessageFlags.Ephemeral], }); if (!interaction.guild) { await interaction.editReply("서버에서만 사용할 수 있어요"); return; } if (await skipCurrentVoice(interaction.guild)) { await interaction.editReply("스킵 되었어요"); } else { await interaction.editReply("실행중인 보이스가 없어요"); } }, );