Skip to main content

ticketSetup

A Flexible yet Powerful Ticket System | Requires: manageTicket()

Implementation​

simplydjs.ticketSetup(interaction, { 
channelId: '01234567890123' // channelId (optional)

// options (optional)
})

Output​

ticket panel

ticket channel

Types​

simplydjs.ticketSetup(
msgOrint: ExtendedMessage | ExtendedInteraction,
options: ticketSetupOptions
): Promise<void>

Options​

ticketSetupOptions​

ParameterTypeRequiredDefaultDescription
strictboolean❌falseEnables strict mode in ticketSetup
channelIdstring❌-Channel Id to send the ticket panel in your server
buttonCustomizableButton❌default buttonPass a CustomizableButton Object to customize the button
embedCustomizableEmbed❌default embedPass a CustomizableEmbed Object to customize the ticket panel embed
export type ticketSetupOptions = {
embed?: CustomizableEmbed;
button?: CustomizableButton;
channelId?: string;
strict: boolean;
};

Example​

  • Default settings​

ticketSetup.js
const simplydjs = require('simply-djs')

simplydjs.ticketSetup(interaction, {
channelId: "01234567890123"
})
  • Customized with options​

ticketSetup.js
const { ButtonStyle } = require('discord.js')
const simplydjs = require('simply-djs')

simpydjs.ticketSetup(interaction, {
channelId: "01234567890123",
strict: true,
button: {
label: "Open ticket",
style: ButtonStyle.Primary
},
embed: {
title: "Ticket",
description: "Open a ticket by clicking the button",
color: simplydjs.toRgb("#406dbc")
}
})