feat: add a slash command so we can be discoverable
Node.js CI / Lint and Test (push) Failing after 38s

This commit is contained in:
2025-08-22 14:52:41 -07:00
parent 74605cc219
commit dde62d4171
3 changed files with 98 additions and 1 deletions
+8
View File
@@ -9,6 +9,7 @@ import {
GatewayIntentBits,
Events,
} from "discord.js";
import { processInteraction } from "./modules/processInteraction.js";
import { processMessage } from "./modules/processMessage.js";
import { instantiateServer } from "./server/serve.js";
import { logger } from "./utils/logger.js";
@@ -29,5 +30,12 @@ caelia.on(Events.MessageCreate, (message) => {
void processMessage(message);
});
caelia.on(Events.InteractionCreate, (interaction) => {
if (!interaction.isChatInputCommand()) {
return;
}
void processInteraction(interaction);
});
await caelia.login(process.env.BOT_TOKEN);
instantiateServer();