diff --git a/mod.ts b/mod.ts index b724658..b08ac54 100644 --- a/mod.ts +++ b/mod.ts @@ -22,8 +22,6 @@ await fastFileLoader(paths).catch((err) => { Deno.exit(1); }); -console.log("EVENTS!: ", events); - export const bot = enableCachePlugin( createBot({ token: Deno.env.get("BOT_TOKEN") || "", diff --git a/src/commands/wryna.ts b/src/commands/wryna.ts new file mode 100644 index 0000000..a822cd7 --- /dev/null +++ b/src/commands/wryna.ts @@ -0,0 +1,40 @@ +import { + ApplicationCommandOptionTypes, + ApplicationCommandTypes, + InteractionResponseTypes, +} from "../../deps.ts"; +import { + humanizeMilliseconds, + snowflakeToTimestamp, +} from "../utils/helpers.ts"; +import { createCommand } from "./mod.ts"; + +createCommand({ + name: "wryna", + description: "What was your nickname in highschool?", + type: ApplicationCommandTypes.ChatInput, + scope: "Global", + options: [ + { + type: ApplicationCommandOptionTypes.String, + name: "input", + description: "Text you would like to send to this command.", + required: true, + }, + ], + execute: async (bot, interaction) => { + const input = interaction.data?.options?.find( + (option) => option.name === "input" + ); + await bot.helpers.sendInteractionResponse( + interaction.id, + interaction.token, + { + type: InteractionResponseTypes.ChannelMessageWithSource, + data: { + content: `${input?.value} was ${interaction.user.username}'s nickname in highschool.`, + }, + } + ); + }, +});