From 15badc68c87823a17a53209542b03c4f9c44a77e Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 7 Jul 2020 21:25:19 -0500 Subject: [PATCH] fix error --- src/index.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/index.js b/src/index.js index cf24f94..1eee00e 100755 --- a/src/index.js +++ b/src/index.js @@ -144,11 +144,14 @@ client.on("message", async message => { // To get the "message" itself we join the `args` back into a string with spaces: const sayMessage = args.join(" "); if (message.member.roles.cache.some(r=>["Admin","Mods","Member of the Order","Botmeister","Ally of the Order","say"].includes(r.name)) ){ - // Then we delete the command message (sneaky, right?). The catch just ignores the error with a cute smiley thing. - // eslint-disable-next-line no-unused-vars - message.delete().catch(O_o=>{}); - // And we get the bot to say the thing: - return message.channel.send(sayMessage); + if(message.content.includes("@"));{ + // Then we delete the command message (sneaky, right?). The catch just ignores the error with a cute smiley thing. + // eslint-disable-next-line no-unused-vars + message.delete().catch(O_o=>{}); + // And we get the bot to say the thing: + return message.channel.send(sayMessage); + + } } }