Fixed reaction

This commit is contained in:
Loic Bersier 2018-09-20 14:09:55 +02:00
parent a0aeb7cdcd
commit f1f774736d
2 changed files with 12 additions and 8 deletions

View file

@ -66,14 +66,17 @@ client.registry
// Auto respond to messages
client.on("message", async (message) => {
let message_content = message.content.toLowerCase();
if(responseObject[message_content]) {
message.channel.send(responseObject[message_content]);
};
if(reactObject[message_content]) {
message.react(reactObject[message_content]);
if(responseObject[message_content] && reactObject[message_content]) {
message.channel.send(responseObject[message_content]);
message.react(reactObject[message_content]);
}
});
else if(reactObject[message_content]) {
message.react(reactObject[message_content]);
}
else if(responseObject[message_content]) {
message.channel.send(responseObject[message_content]);
}
});
client.on('error', console.error);

View file

@ -1,3 +1,4 @@
{
"like if owned": "👍"
"like if owned": "👍",
"fortnite": "🤦"
}