catto.js 0.7.3 → 0.7.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.
Files changed (2) hide show
  1. package/Bot.js +7 -6
  2. package/package.json +2 -2
package/Bot.js CHANGED
@@ -43,7 +43,7 @@ module.exports = class extends EventEmitter {
43
43
  }
44
44
  this.client = new Discord.Client(opts);
45
45
  if (this.options.sharded) {
46
- this.cluster = new ClusterClient(this.client);
46
+ this.client.cluster = new ClusterClient(this.client);
47
47
  }
48
48
  }
49
49
  this.currentStatus = void 0;
@@ -109,6 +109,9 @@ module.exports = class extends EventEmitter {
109
109
  option.setName(opt.name);
110
110
  option.setDescription(opt.description);
111
111
  option.setRequired(opt.required);
112
+ if (opt.types) {
113
+ option.addChannelTypes(...opt.types);
114
+ }
112
115
  cmdo.addChannelOption(option);
113
116
  break;
114
117
  case "role":
@@ -175,16 +178,11 @@ module.exports = class extends EventEmitter {
175
178
  });
176
179
  }
177
180
  this.emit("running", { Discord });
178
- });
179
- this.cluster.on("ready", () => {
180
181
  if (this.cluster.id == (this.cluster.count - 1)) {
181
182
  this.cluster.broadcastEval(client => client.emit("_runningFull"));
182
183
  this.emit("runningFullLast", { Discord });
183
184
  }
184
185
  });
185
- this.client.on("_runningFull", () => {
186
- this.emit("runningFull", { Discord });
187
- });
188
186
  this.client.on("interactionCreate", this.handleInteractionCreate.bind(this));
189
187
  this.client.on("messageCreate", message => {
190
188
  message.author = new User(message.author, this);
@@ -226,6 +224,9 @@ module.exports = class extends EventEmitter {
226
224
  this.emit("botDelete", guild);
227
225
  });
228
226
  }
227
+ get cluster() {
228
+ return this.client.cluster;
229
+ }
229
230
  get servers() {
230
231
  var r = Array.from(this.client.guilds.cache.values());
231
232
  r.count = r.length;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catto.js",
3
- "version": "0.7.3",
3
+ "version": "0.7.5",
4
4
  "description": "Universal module for everything.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -62,4 +62,4 @@
62
62
  },
63
63
  "tough-cookie": "next"
64
64
  }
65
- }
65
+ }