feat: add buttons to throw results
Node.js CI / Lint and Test (push) Successful in 42s

This commit is contained in:
2025-08-15 15:00:27 -07:00
parent 2ad10115b8
commit 2544d2d15b
10 changed files with 286 additions and 9 deletions
+7 -4
View File
@@ -11,6 +11,7 @@ import {
Events,
} from "discord.js";
import { scheduleJob } from "node-schedule";
import { processButton } from "./modules/processButton.js";
import { processCommand } from "./modules/processCommand.js";
import { instantiateServer } from "./server/serve.js";
import { logger } from "./utils/logger.js";
@@ -32,13 +33,15 @@ pavelle.discord.once(Events.ClientReady, () => {
});
pavelle.discord.on(Events.InteractionCreate, (interaction) => {
if (!interaction.isChatInputCommand()) {
return;
}
if (!interaction.inCachedGuild()) {
return;
}
void processCommand(pavelle, interaction);
if (interaction.isChatInputCommand()) {
void processCommand(pavelle, interaction);
}
if (interaction.isButton()) {
void processButton(pavelle, interaction);
}
});
pavelle.discord.on(Events.Error, (error) => {