yaejunyang/packages/bot/commands/skipCurrent.ts
2026-02-23 11:21:48 +00:00

25 lines
No EOL
890 B
TypeScript

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<any> => {
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("실행중인 보이스가 없어요");
}
}
)