From 82301f593600baa59e152ecc3587b9c5f793bcc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A7=81Ash=C3=BB=EA=A7=82?= <30575805+Ashu11-A@users.noreply.github.com> Date: Fri, 24 May 2024 04:28:48 -0400 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Implement=20AddCategory=20and=20Add?= =?UTF-8?q?Select?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/tickets/src/class/Ticket.ts | 6 +- .../components/Template/AddElements.ts | 173 ++++++++++++++++++ plugins/tickets/src/entity/Template.entry.ts | 38 ++++ 3 files changed, 214 insertions(+), 3 deletions(-) create mode 100644 plugins/tickets/src/discord/components/Template/AddElements.ts diff --git a/plugins/tickets/src/class/Ticket.ts b/plugins/tickets/src/class/Ticket.ts index 2bc94201..f3d4987d 100644 --- a/plugins/tickets/src/class/Ticket.ts +++ b/plugins/tickets/src/class/Ticket.ts @@ -109,9 +109,9 @@ export class Ticket { emoji: { name: '📄' } }), new ButtonBuilder({ - customId: 'EmbedCategory', - label: 'Panel Category', - emoji: { name: '🖥️' }, + customId: 'AddCategory', + label: 'Add Categoria', + emoji: { name: '🔖' }, style: ButtonStyle.Secondary }), new ButtonBuilder({ diff --git a/plugins/tickets/src/discord/components/Template/AddElements.ts b/plugins/tickets/src/discord/components/Template/AddElements.ts new file mode 100644 index 00000000..b1c18977 --- /dev/null +++ b/plugins/tickets/src/discord/components/Template/AddElements.ts @@ -0,0 +1,173 @@ +import { Database } from "@/controller/database"; +import { Component } from "@/discord/base"; +import { ModalBuilder } from "@/discord/base/CustomIntetaction"; +import Template from "@/entity/Template.entry"; +import { ActionRowBuilder, APITextInputComponent, ComponentType, EmbedBuilder, TextInputBuilder } from "discord.js"; + +const template = new Database