diff --git a/src/client/events.ts b/src/client/events.ts index d5a1441..5f61da5 100644 --- a/src/client/events.ts +++ b/src/client/events.ts @@ -3,6 +3,7 @@ import ChatInputCommand from "./interactionCreate/ChatInputCommand"; import Button from "./interactionCreate/Button"; import AppLogger from "./appLogger"; import NewUserDiscovery from "./interactionCreate/middleware/NewUserDiscovery"; +import StringDropdown from "./interactionCreate/StringDropdown"; export class Events { public async onInteractionCreate(interaction: Interaction) { @@ -22,6 +23,7 @@ export class Events { if (interaction.isStringSelectMenu()) { AppLogger.LogVerbose("Client", `StringDropdown: ${interaction.customId}`); + StringDropdown.onStringDropdownSelected(interaction); } } diff --git a/src/registry.ts b/src/registry.ts index f49f97c..67936c8 100644 --- a/src/registry.ts +++ b/src/registry.ts @@ -31,6 +31,9 @@ import SeriesEvent from "./buttonEvents/Series"; import TradeButtonEvent from "./buttonEvents/Trade"; import ViewButtonEvent from "./buttonEvents/View"; +// String Dropdown Event Imports +import InventoryStringDropdown from "./stringDropdowns/Inventory"; + export default class Registry { public static RegisterCommands() { // Global Commands @@ -66,5 +69,6 @@ export default class Registry { } public static RegisterStringDropdownEvents() { + CoreClient.RegisterStringDropdownEvent("inventory", new InventoryStringDropdown()); } } \ No newline at end of file diff --git a/src/stringDropdowns/Inventory.ts b/src/stringDropdowns/Inventory.ts new file mode 100644 index 0000000..65d16f6 --- /dev/null +++ b/src/stringDropdowns/Inventory.ts @@ -0,0 +1,8 @@ +import {StringSelectMenuInteraction} from "discord.js"; +import {StringDropdownEvent} from "../type/stringDropdownEvent"; + +export default class Inventory extends StringDropdownEvent { + public override async execute(interaction: StringSelectMenuInteraction) { + await interaction.reply(`Test: ${interaction.customId}, ${interaction.values.join(",")}`); + } +}