import { ButtonInteraction, ModalSubmitInteraction, StringSelectMenuInteraction } from "discord.js"; type InteractionHandler = (interaction: any) => Promise; interface InteractionRoute { predicate: (interaction: ButtonInteraction | StringSelectMenuInteraction | ModalSubmitInteraction) => boolean; handler: () => Promise; method: string; } export const interactionRoutes: InteractionRoute[] = [ { predicate: (i) => i.customId.startsWith("trade_") || i.customId === "amount", handler: () => import("@/modules/trade/trade.interaction"), method: 'handleTradeInteraction' }, { predicate: (i) => i.isButton() && i.customId.startsWith("shop_buy_"), handler: () => import("@/modules/economy/shop.interaction"), method: 'handleShopInteraction' }, { predicate: (i) => i.isButton() && i.customId.startsWith("lootdrop_"), handler: () => import("@/modules/economy/lootdrop.interaction"), method: 'handleLootdropInteraction' }, { predicate: (i) => i.customId.startsWith("createitem_"), handler: () => import("@/modules/admin/item_wizard"), method: 'handleItemWizardInteraction' }, { predicate: (i) => i.isButton() && i.customId === "enrollment", handler: () => import("@/modules/user/enrollment.interaction"), method: 'handleEnrollmentInteraction' } ];