catto.js 0.6.6 → 0.6.7

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 -2
  2. package/package.json +1 -1
package/Bot.js CHANGED
@@ -134,10 +134,15 @@ module.exports = class extends EventEmitter {
134
134
  break;
135
135
  }
136
136
  }
137
- cmds.push(cmdo);
137
+ cmds.push(Object.assign(cmdo.toJSON(), {
138
+ "integration_types": [0, 1].slice(0, (cmd.user ? 2 : 1)),
139
+ "contexts": [0, 1, 2].slice(0, (cmd.user ? 3 : 2)),
140
+ }));
138
141
  }
139
142
  if (this.options.slashListener) {
140
- this.client.application.commands.set(cmds);
143
+ this.client.rest.put(`/applications/${this.client.application.id}/commands`, {
144
+ "body": cmds
145
+ });
141
146
  }
142
147
  this.emit("running", { Discord, MessageBuilder });
143
148
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catto.js",
3
- "version": "0.6.6",
3
+ "version": "0.6.7",
4
4
  "description": "Universal module for everything.",
5
5
  "main": "index.js",
6
6
  "scripts": {