import { SlashCommandBuilder } from "discord.js";
import type { CommandModule } from "../../discord/types.js";
import { notifyService } from "../../services/notify/notify-service.js";

export const notifyDisableCommand: CommandModule = {
  data: new SlashCommandBuilder()
    .setName("notify_disable")
    .setDescription("알림 규칙 비활성화")
    .addStringOption((opt) => opt.setName("rule_id").setDescription("규칙 ID").setRequired(true)),
  async execute(interaction) {
    if (!interaction.guildId) return;
    const id = interaction.options.getString("rule_id", true);
    await notifyService.disableRule(id, interaction.guildId);
    await interaction.reply(`규칙 비활성화 완료: ${id}`);
  },
};
