added the option to disable message command (prefix)

This commit is contained in:
mmacierzanka committed 2021-08-10 02:44:08 +02:00
1 parent 0a9cdb7bde
commit 9e78438d0a
4 files changed
+14 -6

No files matched your search

+4 -1
View File
@@ -157,7 +157,10 @@ export class Bot extends EventEmitter {
if (cmdMsg) {
this.emit("COMMAND", m, cmdMsg);
await cmdMsg.command.start(m, cmdMsg.parameters);
} else if (m.content.startsWith(this.commands.prefix)) {
} else if (
this.commands.prefix &&
m.content.startsWith(this.commands.prefix)
) {
this.emit("MESSAGE", m);
await this.messages.system.send(
"NOT_FOUND",