Update modals

This commit is contained in:
Tarrgon
2026-05-19 12:14:19 -04:00
parent 7e5ec68f7e
commit 13251468b1
7 changed files with 68 additions and 96 deletions
+4 -11
View File
@@ -1,5 +1,5 @@
import { ActionRowBuilder, ButtonInteraction, Client, ModalBuilder, TextInputBuilder, TextInputStyle, MessageFlags } from 'discord.js';
import { canOpenPrivateHelpTicket } from '../utils';
import { ButtonInteraction, Client, ModalBuilder, TextInputStyle, MessageFlags } from 'discord.js';
import { canOpenPrivateHelpTicket, createTextInput } from '../utils';
export default {
name: 'private-help',
@@ -11,16 +11,9 @@ export default {
.setCustomId('open-ticket-modal')
.setTitle('Get in contact');
const input = new TextInputBuilder()
.setCustomId('ticket-message')
.setLabel('What is the reason for your ticket?')
.setStyle(TextInputStyle.Paragraph)
.setPlaceholder('Please be as thorough as possible.')
.setRequired(true)
.setMinLength(10)
.setMaxLength(1500);
const label = createTextInput('ticket-message', 'What is the reason for your ticket?', null, true, TextInputStyle.Paragraph, 1500, 10);
modal.addComponents(new ActionRowBuilder<TextInputBuilder>().addComponents(input));
modal.addLabelComponents(label);
await interaction.showModal(modal);
}