Fixed an issue with context menu interactions not firing

This commit is contained in:
mmacierzanka committed 2021-09-06 23:05:23 +02:00
1 parent 9f66d98fb6
commit 4a6f496009
1 file changed
+1 -1
+1 -1
View File
@@ -199,7 +199,7 @@ export class Bot extends EventEmitter {
this.client.on("interactionCreate", async (i) => { this.client.on("interactionCreate", async (i) => {
let cmd: CommandMessageStructure | null = null; let cmd: CommandMessageStructure | null = null;
try { try {
if (!i.isCommand()) return; if (!i.isCommand() && !i.isContextMenu()) return;
cmd = this.commands.fetch(i); cmd = this.commands.fetch(i);
if (cmd) { if (cmd) {
this.emit("COMMAND", i, cmd); this.emit("COMMAND", i, cmd);