This commit is contained in:
parent
39d44cf8dd
commit
a71b33d879
3 changed files with 14 additions and 0 deletions
|
@ -3,6 +3,7 @@ import ChatInputCommand from "./interactionCreate/ChatInputCommand";
|
||||||
import Button from "./interactionCreate/Button";
|
import Button from "./interactionCreate/Button";
|
||||||
import AppLogger from "./appLogger";
|
import AppLogger from "./appLogger";
|
||||||
import NewUserDiscovery from "./interactionCreate/middleware/NewUserDiscovery";
|
import NewUserDiscovery from "./interactionCreate/middleware/NewUserDiscovery";
|
||||||
|
import StringDropdown from "./interactionCreate/StringDropdown";
|
||||||
|
|
||||||
export class Events {
|
export class Events {
|
||||||
public async onInteractionCreate(interaction: Interaction) {
|
public async onInteractionCreate(interaction: Interaction) {
|
||||||
|
@ -22,6 +23,7 @@ export class Events {
|
||||||
|
|
||||||
if (interaction.isStringSelectMenu()) {
|
if (interaction.isStringSelectMenu()) {
|
||||||
AppLogger.LogVerbose("Client", `StringDropdown: ${interaction.customId}`);
|
AppLogger.LogVerbose("Client", `StringDropdown: ${interaction.customId}`);
|
||||||
|
StringDropdown.onStringDropdownSelected(interaction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,9 @@ import SeriesEvent from "./buttonEvents/Series";
|
||||||
import TradeButtonEvent from "./buttonEvents/Trade";
|
import TradeButtonEvent from "./buttonEvents/Trade";
|
||||||
import ViewButtonEvent from "./buttonEvents/View";
|
import ViewButtonEvent from "./buttonEvents/View";
|
||||||
|
|
||||||
|
// String Dropdown Event Imports
|
||||||
|
import InventoryStringDropdown from "./stringDropdowns/Inventory";
|
||||||
|
|
||||||
export default class Registry {
|
export default class Registry {
|
||||||
public static RegisterCommands() {
|
public static RegisterCommands() {
|
||||||
// Global Commands
|
// Global Commands
|
||||||
|
@ -66,5 +69,6 @@ export default class Registry {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static RegisterStringDropdownEvents() {
|
public static RegisterStringDropdownEvents() {
|
||||||
|
CoreClient.RegisterStringDropdownEvent("inventory", new InventoryStringDropdown());
|
||||||
}
|
}
|
||||||
}
|
}
|
8
src/stringDropdowns/Inventory.ts
Normal file
8
src/stringDropdowns/Inventory.ts
Normal file
|
@ -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(",")}`);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue