feat: add button to acknowledge reminders
Node.js CI / Lint and Test (push) Successful in 40s

This commit is contained in:
2025-11-02 09:13:04 -08:00
parent d5d419b06c
commit a915f50f1a
3 changed files with 61 additions and 3 deletions
+6 -3
View File
@@ -10,6 +10,7 @@ import {
GatewayIntentBits,
Events,
} from "discord.js";
import { processButton } from "./modules/processButton.js";
import { processInteraction } from "./modules/processInteraction.js";
import { processMessage } from "./server/processMessage.js";
import { instantiateServer } from "./server/serve.js";
@@ -36,10 +37,12 @@ caelia.on(Events.MessageCreate, (message) => {
caelia.on(Events.InteractionCreate, (interaction) => {
void analytics.logGatewayEvent(Events.InteractionCreate, { ...interaction });
if (!interaction.isChatInputCommand()) {
return;
if (interaction.isChatInputCommand()) {
void processInteraction(interaction);
}
if (interaction.isButton()) {
void processButton(interaction);
}
void processInteraction(interaction);
});
await caelia.login(process.env.BOT_TOKEN);