@elara-services/tickets 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/index.d.ts +2 -0
- package/index.js +1 -1
- package/package.json +1 -1
- package/renovate.json +5 -0
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@ const { Client } = require("discord.js"),
|
|
|
11
11
|
tickets = new Tickets({
|
|
12
12
|
client,
|
|
13
13
|
prefix: "support", // This is what is used for interactions (buttons) and the start of the channel name
|
|
14
|
+
ticketCategory: "", // When tickets get created they get created in this category, (OPTIONAL) - Default is the category ID for the starter message's channel.
|
|
14
15
|
webhookId: "WEBHOOK ID HERE",
|
|
15
16
|
webhookToken: "WEBHOOK TOKEN HERE",
|
|
16
17
|
encryptToken: "ASB!@#$%^&*(B", // This is to encrypt/decrypt the user IDs in the channel topic, to avoid non-staff from seeing who's ticket it is
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -102,7 +102,7 @@ module.exports = class Tickets {
|
|
|
102
102
|
async run(int) {
|
|
103
103
|
if (int?.isButton?.()) {
|
|
104
104
|
let { guild, channel, member, customId } = int,
|
|
105
|
-
category = guild?.channels?.resolve?.(channel?.parentId),
|
|
105
|
+
category = guild?.channels?.resolve?.(this.options.ticketCategory || channel?.parentId),
|
|
106
106
|
[ support, supportUsers ] = [ [], [] ];
|
|
107
107
|
if (!guild || !guild.available || !channel || !member || !category) return;
|
|
108
108
|
if (this.options?.supportRoleIds?.length) for (const sup of this.options.supportRoleIds) {
|
package/package.json
CHANGED