From d2ded5baffdf9366e6811763761073701809d7c3 Mon Sep 17 00:00:00 2001 From: Loic Bersier Date: Fri, 21 Sep 2018 15:31:34 +0200 Subject: [PATCH] Bot dosent respond to himself in the autoresponse ( yea i forgot to put that in before, sorry ) --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 92ebfae3..59d5fc82 100644 --- a/index.js +++ b/index.js @@ -73,6 +73,8 @@ client.registry // message.channel.send(delresponseObject[message_content]); // } else // React to the message and send an auto response with it + if (message.author.bot) return; { + if(responseObject[message_content] && reactObject[message_content]) { message.channel.send(responseObject[message_content]); message.react(reactObject[message_content]); @@ -85,7 +87,7 @@ client.registry else if(responseObject[message_content]) { message.channel.send(responseObject[message_content]); } - }); + }}); client.on('error', console.error); process.on('unhandledRejection', error => console.error('Uncaught Promise Rejection', error));