generated from nhcarrigan/template
feat: add a slash command so we can be discoverable
Node.js CI / Lint and Test (push) Failing after 38s
Node.js CI / Lint and Test (push) Failing after 38s
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user