import { ChatInputCommandInteraction, GuildMember, MessageFlags, SlashCommandBuilder } from "discord.js"; import { defineCommand } from "../command"; import { getUserProfile, setUserNya } from "../db"; export default defineCommand( new SlashCommandBuilder() .setName("냥") .setDescription("???"), async (interaction: ChatInputCommandInteraction): Promise => { await interaction.deferReply({ flags: [MessageFlags.Ephemeral] }); const profile = await getUserProfile(interaction.user.id); await setUserNya(interaction.user.id, !profile.nya); await interaction.editReply(profile.nya ? "냐앙..." : "냐앙!!"); } )