@elara-services/tickets 2.0.3 → 2.0.4

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.
Files changed (2) hide show
  1. package/index.js +2 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -11,6 +11,8 @@ const { Collection, WebhookClient, MessageEmbed } = require("discord.js"),
11
11
 
12
12
  module.exports = class Tickets {
13
13
  constructor(options) {
14
+ if (typeof options !== "object") throw new Error(`You didn't provide any data in the constructor, fill it out!`);
15
+ if (!("client" in options) || !("prefix" in options) || !("encryptToken" in options)) throw new Error(`You forgot to fill out either 'client', 'prefix' or 'encryptToken'`)
14
16
  this.options = options;
15
17
  };
16
18
  get prefix() { return `system:ticket:${this.options.prefix}`; };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elara-services/tickets",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "Helper for tickets",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",