Initial commit.

This commit is contained in:
Tarrgon
2025-05-28 10:44:41 -04:00
commit e0efb86dce
50 changed files with 8579 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
import { ActionRowBuilder, ButtonInteraction, Client, ModalBuilder, TextInputBuilder, TextInputStyle, MessageFlags } from 'discord.js';
import { ticketCooldownMap } from '../shared/ticket-cooldown';
export default {
name: 'private-help',
handler: async function (client: Client, interaction: ButtonInteraction) {
const allowedAt = ticketCooldownMap.get(interaction.user.id);
if (allowedAt && Date.now() < allowedAt)
return interaction.reply({ flags: [MessageFlags.Ephemeral], content: 'You can only create one ticket per day.' });
const modal = new ModalBuilder()
.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);
modal.addComponents(new ActionRowBuilder<TextInputBuilder>().addComponents(input));
await interaction.showModal(modal);
}
};