@elara-services/tickets 4.3.0 → 4.3.2
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/lib/v13.js +3 -3
- package/lib/v14.js +3 -3
- package/package.json +1 -1
package/lib/v13.js
CHANGED
|
@@ -114,9 +114,9 @@ module.exports = class Tickets extends base {
|
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
const hasEmbeds = this.options.ticket?.close?.confirm?.embeds;
|
|
117
|
+
const hasEmbeds = this.options.ticket?.close?.confirm?.embeds || [];
|
|
118
118
|
let embs = await Promise.all(
|
|
119
|
-
(hasEmbeds
|
|
119
|
+
(hasEmbeds?.length
|
|
120
120
|
? hasEmbeds
|
|
121
121
|
: [
|
|
122
122
|
embed(undefined, {
|
|
@@ -129,7 +129,7 @@ module.exports = class Tickets extends base {
|
|
|
129
129
|
]
|
|
130
130
|
).map((c) => parser(c, { guild, member, user: member.user })),
|
|
131
131
|
);
|
|
132
|
-
const content = this.options.ticket?.close?.confirm?.content ||
|
|
132
|
+
const content = this.options.ticket?.close?.confirm?.content || undefined;
|
|
133
133
|
if (!is.array(embs) && !is.string(content)) {
|
|
134
134
|
embs = [
|
|
135
135
|
await parser(
|
package/lib/v14.js
CHANGED
|
@@ -110,9 +110,9 @@ module.exports = class Tickets extends base {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
const hasEmbeds = this.options.ticket?.close?.confirm?.embeds;
|
|
113
|
+
const hasEmbeds = this.options.ticket?.close?.confirm?.embeds || [];
|
|
114
114
|
let embs = await Promise.all(
|
|
115
|
-
(hasEmbeds
|
|
115
|
+
(hasEmbeds?.length
|
|
116
116
|
? hasEmbeds
|
|
117
117
|
: [
|
|
118
118
|
embed(undefined, {
|
|
@@ -125,7 +125,7 @@ module.exports = class Tickets extends base {
|
|
|
125
125
|
]
|
|
126
126
|
).map((c) => parser(c, { guild, member, user: member.user })),
|
|
127
127
|
);
|
|
128
|
-
const content = this.options.ticket?.close?.confirm?.content ||
|
|
128
|
+
const content = this.options.ticket?.close?.confirm?.content || undefined;
|
|
129
129
|
if (!is.array(embs) && !is.string(content)) {
|
|
130
130
|
embs = [
|
|
131
131
|
await parser(
|