@elara-services/tickets 4.3.2 → 4.3.3
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.js +0 -4
- package/lib/base.js +5 -6
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const { emitPackageMessage, log } = require("@elara-services/utils");
|
|
2
1
|
const pack = require("./package.json");
|
|
3
2
|
const { version } = require("discord.js");
|
|
4
3
|
|
|
@@ -8,9 +7,6 @@ module.exports = (() => {
|
|
|
8
7
|
}
|
|
9
8
|
let [major] = version.split(".");
|
|
10
9
|
if (["13", "14"].includes(major)) {
|
|
11
|
-
emitPackageMessage(`${pack.name} - thanks`, () => {
|
|
12
|
-
log(`[${pack.name}, v${pack.version}]: Thanks for using the package!`, `Please support the packages via ${pack.funding.map((c) => c.url).join(" OR ")}`);
|
|
13
|
-
});
|
|
14
10
|
return require(`./lib/v${major}`);
|
|
15
11
|
}
|
|
16
12
|
throw new Error(`[${pack.name}, v${pack.version}]: The discord.js version you're using isn't supported by this package. (currently supported: v13, v14)`);
|
package/lib/base.js
CHANGED
|
@@ -3,14 +3,12 @@ const {
|
|
|
3
3
|
Interactions: { button },
|
|
4
4
|
ButtonStyle,
|
|
5
5
|
} = require("@elara-services/packages");
|
|
6
|
-
const { is, status, isV13, embedComment, log } = require("@elara-services/utils");
|
|
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
9
|
const required = ["client", "prefix", "encryptToken"];
|
|
10
10
|
const moment = require("moment");
|
|
11
11
|
|
|
12
|
-
let showed = false;
|
|
13
|
-
|
|
14
12
|
module.exports = class Tickets {
|
|
15
13
|
/**
|
|
16
14
|
* @param {import("@elara-services/tickets").TicketOptions} options
|
|
@@ -25,9 +23,10 @@ module.exports = class Tickets {
|
|
|
25
23
|
}
|
|
26
24
|
}
|
|
27
25
|
this.options = options;
|
|
28
|
-
if (
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
if (options.suppressPatreon !== true) {
|
|
27
|
+
emitPackageMessage(`${name} - thanks`, () => {
|
|
28
|
+
log(`[${name}, v${version}]: Thanks for using the package!`, `Please support the packages via ${funding.map((c) => c.url).join(" OR ")}`);
|
|
29
|
+
});
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
32
|
|