@elara-services/tickets 4.4.1 → 4.4.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/base.js +4 -2
- package/package.json +1 -1
package/lib/base.js
CHANGED
|
@@ -26,7 +26,10 @@ module.exports = class Tickets {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
this.options = options;
|
|
29
|
-
this.rest = new REST(
|
|
29
|
+
this.rest = new REST();
|
|
30
|
+
if ("setToken" in this.rest && options.client.token) {
|
|
31
|
+
this.rest.setToken(options.client.token);
|
|
32
|
+
}
|
|
30
33
|
if (options.suppressPatreon !== true) {
|
|
31
34
|
emitPackageMessage(`${name} - thanks`, () => {
|
|
32
35
|
log(`[${name}, v${version}]: Thanks for using the package!`, `Please support the packages via ${funding.map((c) => c.url).join(" OR ")}`);
|
|
@@ -311,7 +314,6 @@ module.exports = class Tickets {
|
|
|
311
314
|
if (!options) {
|
|
312
315
|
throw new Error(`No options provided`);
|
|
313
316
|
}
|
|
314
|
-
|
|
315
317
|
if (hasBit(options.flags, 1 << 15)) {
|
|
316
318
|
return await this.rest
|
|
317
319
|
.post(Routes.channelMessages(channelId), {
|