@elara-services/tickets 4.3.4 → 4.3.6
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/index.d.ts +2 -0
- package/lib/base.js +2 -1
- package/lib/v13.js +2 -2
- package/lib/v14.js +2 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -55,6 +55,7 @@ declare module "@elara-services/tickets" {
|
|
|
55
55
|
category?: string;
|
|
56
56
|
closeReason?: boolean;
|
|
57
57
|
supportCommentThread?: boolean;
|
|
58
|
+
supportCommentThreadMentionSupport?: boolean;
|
|
58
59
|
limitOnePerUser?: boolean;
|
|
59
60
|
open?: Pick<MessageOptions, "content" | "embeds">
|
|
60
61
|
close?: {
|
|
@@ -62,6 +63,7 @@ declare module "@elara-services/tickets" {
|
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
65
|
}
|
|
66
|
+
|
|
65
67
|
|
|
66
68
|
interface LangFile {
|
|
67
69
|
NO_BAN_PERMS_USER_IN_APPEAL_SERVER(server: Guild): string;
|
package/lib/base.js
CHANGED
|
@@ -6,6 +6,7 @@ const {
|
|
|
6
6
|
const { is, status, isV13, embedComment, log, emitPackageMessage } = require("@elara-services/utils");
|
|
7
7
|
const { WebhookClient } = require("discord.js");
|
|
8
8
|
const { name, version, funding } = require("../package.json");
|
|
9
|
+
const { inspect } = require("util");
|
|
9
10
|
const required = ["client", "prefix", "encryptToken"];
|
|
10
11
|
const moment = require("moment");
|
|
11
12
|
|
|
@@ -129,7 +130,7 @@ module.exports = class Tickets {
|
|
|
129
130
|
return null;
|
|
130
131
|
}
|
|
131
132
|
if (this.options?.debug) {
|
|
132
|
-
|
|
133
|
+
log(inspect(...args, true, 50));
|
|
133
134
|
}
|
|
134
135
|
return null;
|
|
135
136
|
}
|
package/lib/v13.js
CHANGED
|
@@ -151,7 +151,7 @@ module.exports = class Tickets extends base {
|
|
|
151
151
|
return send({
|
|
152
152
|
ephemeral: true,
|
|
153
153
|
content,
|
|
154
|
-
embeds:
|
|
154
|
+
embeds: embs,
|
|
155
155
|
components: [
|
|
156
156
|
{
|
|
157
157
|
type: 1,
|
|
@@ -525,7 +525,7 @@ module.exports = class Tickets extends base {
|
|
|
525
525
|
type: 12,
|
|
526
526
|
})
|
|
527
527
|
.catch((e) => this._debug(e));
|
|
528
|
-
if (thread && !this.getSupportIds.empty) {
|
|
528
|
+
if (thread && !this.getSupportIds.empty && this.options.ticket?.supportCommentThreadMentionSupport === true) {
|
|
529
529
|
await thread
|
|
530
530
|
.send({
|
|
531
531
|
content: `${this.getSupportIds.roles.length ? this.getSupportIds.roles.map((c) => `<@&${c}>`).join(" ") : ""}${this.getSupportIds.users.length ? `${this.getSupportIds.roles.length ? ` | ` : ""}${this.getSupportIds.users.map((c) => `<@${c}>`).join(" ")}` : ""}`,
|
package/lib/v14.js
CHANGED
|
@@ -147,7 +147,7 @@ module.exports = class Tickets extends base {
|
|
|
147
147
|
return send({
|
|
148
148
|
ephemeral: true,
|
|
149
149
|
content,
|
|
150
|
-
embeds:
|
|
150
|
+
embeds: embs,
|
|
151
151
|
components: [
|
|
152
152
|
{
|
|
153
153
|
type: 1,
|
|
@@ -530,7 +530,7 @@ module.exports = class Tickets extends base {
|
|
|
530
530
|
type: 12,
|
|
531
531
|
})
|
|
532
532
|
.catch((e) => this._debug(e));
|
|
533
|
-
if (thread && !this.getSupportIds.empty) {
|
|
533
|
+
if (thread && !this.getSupportIds.empty && this.options.ticket?.supportCommentThreadMentionSupport === true) {
|
|
534
534
|
await thread
|
|
535
535
|
.send({
|
|
536
536
|
content: `${this.getSupportIds.roles.length ? this.getSupportIds.roles.map((c) => `<@&${c}>`).join(" ") : ""}${this.getSupportIds.users.length ? `${this.getSupportIds.roles.length ? ` | ` : ""}${this.getSupportIds.users.map((c) => `<@${c}>`).join(" ")}` : ""}`,
|