Archived
removed deprecated listener
This commit is contained in:
1 parent
06d9a90057
commit
6fd5e8b892
1 file changed
+10
-1
+10
-1
@@ -118,7 +118,7 @@ export class Bot extends EventEmitter {
|
|||||||
}
|
}
|
||||||
this.emit("READY");
|
this.emit("READY");
|
||||||
});
|
});
|
||||||
this.client.on("message", async (m) => {
|
this.client.on("messageCreate", async (m) => {
|
||||||
const cmdMsg = this.commands.fetchFromMessage(m);
|
const cmdMsg = this.commands.fetchFromMessage(m);
|
||||||
if (cmdMsg) {
|
if (cmdMsg) {
|
||||||
this.emit("COMMAND", m, cmdMsg);
|
this.emit("COMMAND", m, cmdMsg);
|
||||||
@@ -194,6 +194,15 @@ export class Bot extends EventEmitter {
|
|||||||
this.emit("ERROR", e);
|
this.emit("ERROR", e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.messages.system.send(
|
||||||
|
"NOT_FOUND",
|
||||||
|
{
|
||||||
|
phrase: i.commandName,
|
||||||
|
user: i.member as GuildMember,
|
||||||
|
},
|
||||||
|
i
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in new issue
Block a user