all repos — stealth-developers @ 6ac5bc72ec4532c8740a8eb324b23149192c2a80

feat(tickets): link to ticket websiet
vi did:web:vt3e.cat
Sat, 09 May 2026 03:36:43 +0100
commit

6ac5bc72ec4532c8740a8eb324b23149192c2a80

parent

4e553f790a21ed2b4273883ae8705f53d8fdd014

1 files changed, 9 insertions(+), 26 deletions(-)

jump to
M src/interactions/commands/tickets/_shared.tssrc/interactions/commands/tickets/_shared.ts

@@ -32,9 +32,7 @@ } as const;

// -- modals --------------------------------------------------------------------------------------- export function getTicketReasonModal(staff = false) { - const modal = new ModalBuilder() - .setCustomId(MODAL_IDS.reason) - .setTitle("Close Ticket"); + const modal = new ModalBuilder().setCustomId(MODAL_IDS.reason).setTitle("Close Ticket"); const pubReason = new LabelBuilder() .setLabel("Public Reason")

@@ -54,9 +52,7 @@ );

const privateReason = new LabelBuilder() .setLabel("Private Reason") - .setDescription( - "Provide a reason for closing the ticket - this will only be visible to staff", - ) + .setDescription("Provide a reason for closing the ticket - this will only be visible to staff") .setTextInputComponent( new TextInputBuilder() .setCustomId(INPUT_IDS.PRIVATE_REASON)

@@ -69,9 +65,7 @@

const deleteGroup = new LabelBuilder() .setLabel("Immediately delete channel") .setCheckboxComponent( - new CheckboxBuilder() - .setCustomId("ticket:delete_checkbox") - .setDefault(false), + new CheckboxBuilder().setCustomId("ticket:delete_checkbox").setDefault(false), ); modal.addLabelComponents(pubReason);

@@ -106,9 +100,9 @@ : `### ${title} Reason\n-# No ${title.toLowerCase()} reason provided.`;

const buttons = new ActionRowBuilder<ButtonBuilder>().addComponents( new ButtonBuilder() - .setCustomId(`transcript-btn:${ticket.id}`) .setLabel("View Transcript") - .setStyle(ButtonStyle.Primary), + .setStyle(ButtonStyle.Link) + .setURL(`https://tickets.vt3e.cat/tickets/${ticket.id}`), ); if (isPublic) {

@@ -122,12 +116,8 @@ );

} const wasBehalfTicket = ticket.openedBy !== ticket.authorId; - const reasonText = ticket.topic - ? `for reason: ${ticket.topic}` - : "without a provided reason"; - const behalfText = wasBehalfTicket - ? `**Opened By**: <@${ticket.openedBy}> ${reasonText}` - : null; + const reasonText = ticket.topic ? `for reason: ${ticket.topic}` : "without a provided reason"; + const behalfText = wasBehalfTicket ? `**Opened By**: <@${ticket.openedBy}> ${reasonText}` : null; const container = new ContainerBuilder() .addTextDisplayComponents(

@@ -150,9 +140,7 @@ .filter(Boolean)

.join("\n"), ), ) - .addSeparatorComponents( - new SeparatorBuilder().setDivider(false).setSpacing(2), - ) + .addSeparatorComponents(new SeparatorBuilder().setDivider(false).setSpacing(2)) .addTextDisplayComponents( text( [

@@ -187,12 +175,7 @@ )

.join(", "); return { - container: constructTicketContainer( - ticket, - attachmentsString, - context, - isPublic, - ), + container: constructTicketContainer(ticket, attachmentsString, context, isPublic), transcriptText, attachments, files: [file],