@elara-services/tickets 4.0.3 → 4.0.5

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 CHANGED
@@ -11,6 +11,7 @@ module.exports = class Tickets {
11
11
  * @param {import("@elara-services/tickets").TicketOptions} options
12
12
  */
13
13
  constructor(options) {
14
+ this.options = options;
14
15
  if (!is.object(options)) {
15
16
  throw new Error(this.str("NO_CONSTRUCTOR_OPTIONS")());
16
17
  }
@@ -19,7 +20,6 @@ module.exports = class Tickets {
19
20
  throw new Error(this.str("NO_CONSTRUCTOR_OPTIONS")(`'${r}'`));
20
21
  }
21
22
  }
22
- this.options = options;
23
23
  }
24
24
 
25
25
  get prefix() {
@@ -60,6 +60,9 @@ module.exports = class Tickets {
60
60
 
61
61
  /** @private */
62
62
  _debug(...args) {
63
+ if (!is.object(this.options)) {
64
+ return null;
65
+ }
63
66
  if (this.options?.debug) {
64
67
  console.log(...args);
65
68
  }
package/lib/v13.js CHANGED
@@ -16,6 +16,7 @@ module.exports = class Tickets extends base {
16
16
  */
17
17
  constructor(options = {}) {
18
18
  super(options);
19
+ this.options = options;
19
20
  }
20
21
  /**
21
22
  * @param {import("discord.js").Interaction} int
package/lib/v14.js CHANGED
@@ -12,6 +12,7 @@ module.exports = class Tickets extends base {
12
12
  */
13
13
  constructor(options = {}) {
14
14
  super(options);
15
+ this.options = options;
15
16
  }
16
17
  /**
17
18
  * @param {import("discord.js").Interaction} int
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elara-services/tickets",
3
- "version": "4.0.3",
3
+ "version": "4.0.5",
4
4
  "description": "Helper for tickets",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@elara-services/packages": "^6.0.7",
21
- "@elara-services/utils": "^1.2.32",
21
+ "@elara-services/utils": "^1.2.33",
22
22
  "@elara-services/webhooks": "^2.1.9"
23
23
  },
24
24
  "devDependencies": {