refactor(menu): Made sure the menu can be used for more than group

This commit is contained in:
Michel Fedde 2025-06-20 17:48:00 +02:00
parent a79898b2e9
commit 1d73ee8a78
16 changed files with 650 additions and 406 deletions

View file

@ -0,0 +1,17 @@
import {Modal} from "./Modal";
import {Interaction, MessageComponentInteraction, TextInputBuilder} from "discord.js";
export class Prompt extends Modal {
public async requestValue(
label: string,
field: TextInputBuilder,
interaction: MessageComponentInteraction
): Promise<string> {
const modal = this.getBuilder()
.setTitle(label);
await interaction.showModal(modal);
const responseInteraction = await this.awaitResponse();
responseInteraction.fields.getTextInputValue()
}
}