catto.js 0.7.0 → 0.7.1

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 +11 -0
  2. package/package.json +1 -1
package/Bot.js CHANGED
@@ -35,6 +35,7 @@ module.exports = class extends EventEmitter {
35
35
  }
36
36
  });
37
37
  }
38
+ this.currentStatus = void 0;
38
39
  this.buttons = new Map();
39
40
  this.commands = new Map();
40
41
  this.slashCommands = new Map();
@@ -210,6 +211,11 @@ module.exports = class extends EventEmitter {
210
211
  r.count = r.length;
211
212
  return r;
212
213
  }
214
+ get channels() {
215
+ var r = Array.from(this.client.channels.cache.values());
216
+ r.count = r.length;
217
+ return r;
218
+ }
213
219
  slashCommand(basic, options, executor) {
214
220
  if (!basic.name.startsWith("/")) {
215
221
  throw new Error("Slash command starts with /.");
@@ -373,4 +379,9 @@ module.exports = class extends EventEmitter {
373
379
  this.emit("interaction", interaction);
374
380
  }
375
381
  }
382
+ setStatus(data) {
383
+ this.currentStatus = data;
384
+ this.client.options.presence = data;
385
+ return this.client.user.setPresence(data);
386
+ }
376
387
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catto.js",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Universal module for everything.",
5
5
  "main": "index.js",
6
6
  "scripts": {