catto.js 0.5.4 → 0.5.6
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/Bot.js +4 -2
- package/package.json +1 -1
package/Bot.js
CHANGED
|
@@ -15,6 +15,7 @@ module.exports = class extends EventEmitter {
|
|
|
15
15
|
"intents": 98045,
|
|
16
16
|
"apiv": 10,
|
|
17
17
|
"slashListener": !0,
|
|
18
|
+
"buttonListener": !0,
|
|
18
19
|
"publicKey": "",
|
|
19
20
|
"debug": !1
|
|
20
21
|
}, options || {});
|
|
@@ -23,6 +24,7 @@ module.exports = class extends EventEmitter {
|
|
|
23
24
|
} else {
|
|
24
25
|
this.client = new Discord.Client({
|
|
25
26
|
"intents": new Discord.IntentsBitField(this.options.intents),
|
|
27
|
+
"partials": [Discord.Partials.Channel, Discord.Partials.GuildMember, Discord.Partials.GuildScheduledEvent, Discord.Partials.Message, Discord.Partials.Reaction, Discord.Partials.ThreadMember, Discord.Partials.User],
|
|
26
28
|
"rest": {
|
|
27
29
|
"version": this.options.apiv
|
|
28
30
|
},
|
|
@@ -248,7 +250,7 @@ module.exports = class extends EventEmitter {
|
|
|
248
250
|
if (interaction.member) {
|
|
249
251
|
interaction.member.user = new User(interaction.member.user, this);
|
|
250
252
|
}
|
|
251
|
-
if (interaction.isChatInputCommand()) {
|
|
253
|
+
if (this.options.slashListener && interaction.isChatInputCommand()) {
|
|
252
254
|
var command = this.slashCommands.get(interaction.commandName);
|
|
253
255
|
if (command) {
|
|
254
256
|
try {
|
|
@@ -266,7 +268,7 @@ module.exports = class extends EventEmitter {
|
|
|
266
268
|
} else {
|
|
267
269
|
interaction.reply({}).catch(() => {});
|
|
268
270
|
}
|
|
269
|
-
} else if (interaction.isButton()) {
|
|
271
|
+
} else if (this.options.buttonListener && interaction.isButton()) {
|
|
270
272
|
var button = this.buttons.get(interaction.customId);
|
|
271
273
|
if (button) {
|
|
272
274
|
try {
|