19 lines
No EOL
700 B
TypeScript
19 lines
No EOL
700 B
TypeScript
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<any> => {
|
|
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 ? "냐앙..." : "냐앙!!");
|
|
}
|
|
) |