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
+20 -3
View File
@@ -4,22 +4,39 @@
* @author Naomi Carrigan
*/
import { leaderboard as leaderboardButton } from "../buttons/leaderboard.js";
import { throwButton } from "../buttons/throwButton.js";
import { about } from "../commands/about.js";
import { config } from "../commands/config.js";
import { leaderboard } from "../commands/leaderboard.js";
import { throwCmd } from "../commands/throwCmd.js";
import type { Button } from "../interfaces/button.js";
import type { Command } from "../interfaces/command.js";
const defaultHandler: Command = async(_lynira, interaction) => {
const defaultCommandHandler: Command = async(_lynira, interaction) => {
await interaction.editReply({
content: "This command is not implemented yet.",
});
};
export const handlers: { _default: Command } & Record<string, Command> = {
_default: defaultHandler,
const defaultButtonHandler: Button = async(_pavelle, interaction) => {
await interaction.editReply({
content: "This button is not implemented yet.",
});
};
const commandHandlers: { _default: Command } & Record<string, Command> = {
_default: defaultCommandHandler,
about: about,
config: config,
leaderboard: leaderboard,
throw: throwCmd,
};
const buttonHandlers: { _default: Button } & Record<string, Button> = {
_default: defaultButtonHandler,
leaderboard: leaderboardButton,
throw: throwButton,
};
export { commandHandlers, buttonHandlers };