Skip to main content

ticketSystem

This is an example of ticketSystem

With Customization

const simplydjs = require("simply-djs");

interactionCreate Event

// interactionCreate Event
simplydjs.clickBtn(interaction, {
embedDesc: "embed description",
embedColor: "hex code", // default: #075FFF
closeColor: "color from buttons",
closeEmoji: "emoji id",
delColor: "color from buttons",
delEmoji: "emoji id", // default: โŒ
openColor: "color from buttons",
openEmoji: "emoji id",
timeout: true,
cooldownMsg: "message",
categoryID: "category id",
role: "role id",
ticketname: "ticket-{tag}" // Custom Ticket name. {tag} | {id} | {username}
});

messageCreate Event (setup-ticket command)

// messageCreate event

simplydjs.ticketSystem(message, message.channel, {
embedDesc: "embed description",
embedColor: "hex code", // default: #075FFFF
embedFoot: "footer text",
emoji: "emoji id", // default:, ๐ŸŽซ
color: "color from buttons"
});
INFO

Without Customization

interactionCreate Event

// interactionCreate event
simplydjs.clickBtn(button);

messageCreate Event (setup-ticket command)

// messageCreate event

simplydjs.ticketSystem(message, message.channel);
TIP

Slash Support.

The package supports Auto Slash Recognition ! So no more slash options.

Output

image

image

Options for clickBtn function

OptionsTypeRequiredDefaultDescription
timeoutBooleanโœ˜trueTimeout which deletes the ticket after 10 minutes to reduce clutter
cooldownMsgStringโœ˜You have already opened a ticketMessage sent when a ticket is already opened by the user
roleStringโœ˜noneSupport Role ID. Users with the role have access to see the ticket
pingRoleStringโœ˜noneIts role. But it pings ;)

New Options

OptionsTypeRequiredDefaultDescription
ticketnameStringโœ˜Ticket opened by {tag}Custom Ticket name, Use {tag} {username} {id} for user tag/username/id
logChannelChannel IDโœ˜noneLogs When Ticket is deleted (with transcript)

Embed

OptionsTypeRequiredDefaultDescription
embedDescStringโœ˜a long descriptionEmbed Description of the embed which is sent when the ticket has been opened
embedColorHex Codeโœ˜#075FFFEmbed Color of the embed which is sent when the ticket has been opened
creditBooleanโœ˜trueCredit the package

New Options

OptionsTypeRequiredDefaultDescription
embedEmbedโœ˜embedCustom Embed when ticket opened and use {tag} {username} {id} for user tag/username/id in description
logembedEmbedโœ˜embedCustom Embed for logs and use {tag} {username} {id} for user tag/username/id in description
confirmEmbEmbedโœ˜embedCustom Embed for confirmation at ticket deletion

Close Ticket Options

OptionsTypeRequiredDefaultDescription
closeColorButton Styleโœ˜PRIMARYThe color of the Close Ticket Button
closeEmojiEmoji IDโœ˜๐Ÿ”’The emoji of the Close Ticket Button

Delete Ticket Options

OptionsTypeRequiredDefaultDescription
delColorButton Styleโœ˜SECONDARYThe color of the Delete Ticket Button
delEmojiEmoji IDโœ˜โŒThe emoji of the Delete Ticket Button

Reopen Ticket Options

OptionsTypeRequiredDefaultDescription
openColorButton Styleโœ˜SUCCESSThe color of the Reopen Ticket Button
openEmojiEmoji IDโœ˜๐Ÿ”“The emoji of the Reopen Ticket Button

Transcript Ticket Options

OptionsTypeRequiredDefaultDescription
trColorButton Styleโœ˜PRIMARYThe color of the Transcript Ticket Button
trEmojiEmoji IDโœ˜๐Ÿ“œThe emoji of the Transcript Ticket Button

Options for ticketSystem function

OptionsTypeRequiredDefaultDescription
slashBooleanโœ˜falseSlash Support for the ticketSystem (need to be in a slash command)
embedEmbedโœ˜embedCustom Embed at Ticket opening panel

Embed

OptionsTypeRequiredDefaultDescription
embedDescStringโœ˜๐ŸŽซ Create a ticket by clicking the button ๐ŸŽซEmbed Description of the open ticket embed
embedColorHex Codeโœ˜#075FFFEmbed Color of the open ticket embed
embedFootStringโœ˜creditsEmbed Footer of the open ticket embed (when credits: false)
creditBooleanโœ˜trueCredit the package

Buttons

OptionsTypeRequiredDefaultDescription
colorButton Styleโœ˜SECONDARYThe color of the Open Ticket Button
emojiEmoji IDโœ˜๐ŸŽซThe emoji of the Open Ticket Button