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
Options for clickBtn function
Options | Type | Required | Default | Description | |
---|---|---|---|---|---|
timeout | Boolean | โ | true | Timeout which deletes the ticket after 10 minutes to reduce clutter | |
cooldownMsg | String | โ | You have already opened a ticket | Message sent when a ticket is already opened by the user | |
role | String | โ | none | Support Role ID. Users with the role have access to see the ticket | |
pingRole | String | โ | none | Its role. But it pings ;) |
New Options
Options | Type | Required | Default | Description | |
---|---|---|---|---|---|
ticketname | String | โ | Ticket opened by {tag} | Custom Ticket name, Use {tag} {username} {id} for user tag/username/id | |
logChannel | Channel ID | โ | none | Logs When Ticket is deleted (with transcript) |
Embed
Options | Type | Required | Default | Description |
---|---|---|---|---|
embedDesc | String | โ | a long description | Embed Description of the embed which is sent when the ticket has been opened |
embedColor | Hex Code | โ | #075FFF | Embed Color of the embed which is sent when the ticket has been opened |
credit | Boolean | โ | true | Credit the package |
New Options
Options | Type | Required | Default | Description |
---|---|---|---|---|
embed | Embed | โ | embed | Custom Embed when ticket opened and use {tag} {username} {id} for user tag/username/id in description |
logembed | Embed | โ | embed | Custom Embed for logs and use {tag} {username} {id} for user tag/username/id in description |
confirmEmb | Embed | โ | embed | Custom Embed for confirmation at ticket deletion |
Close Ticket Options
Options | Type | Required | Default | Description |
---|---|---|---|---|
closeColor | Button Style | โ | PRIMARY | The color of the Close Ticket Button |
closeEmoji | Emoji ID | โ | ๐ | The emoji of the Close Ticket Button |
Delete Ticket Options
Options | Type | Required | Default | Description |
---|---|---|---|---|
delColor | Button Style | โ | SECONDARY | The color of the Delete Ticket Button |
delEmoji | Emoji ID | โ | โ | The emoji of the Delete Ticket Button |
Reopen Ticket Options
Options | Type | Required | Default | Description |
---|---|---|---|---|
openColor | Button Style | โ | SUCCESS | The color of the Reopen Ticket Button |
openEmoji | Emoji ID | โ | ๐ | The emoji of the Reopen Ticket Button |
Transcript Ticket Options
Options | Type | Required | Default | Description |
---|---|---|---|---|
trColor | Button Style | โ | PRIMARY | The color of the Transcript Ticket Button |
trEmoji | Emoji ID | โ | ๐ | The emoji of the Transcript Ticket Button |
Options for ticketSystem function
Options | Type | Required | Default | Description |
---|---|---|---|---|
slash | Boolean | โ | false | Slash Support for the ticketSystem (need to be in a slash command) |
embed | Embed | โ | embed | Custom Embed at Ticket opening panel |
Embed
Options | Type | Required | Default | Description |
---|---|---|---|---|
embedDesc | String | โ | ๐ซ Create a ticket by clicking the button ๐ซ | Embed Description of the open ticket embed |
embedColor | Hex Code | โ | #075FFF | Embed Color of the open ticket embed |
embedFoot | String | โ | credits | Embed Footer of the open ticket embed (when credits: false) |
credit | Boolean | โ | true | Credit the package |
Buttons
Options | Type | Required | Default | Description |
---|---|---|---|---|
color | Button Style | โ | SECONDARY | The color of the Open Ticket Button |
emoji | Emoji ID | โ | ๐ซ | The emoji of the Open Ticket Button |