Fixed reaction
This commit is contained in:
parent
a0aeb7cdcd
commit
f1f774736d
2 changed files with 12 additions and 8 deletions
17
index.js
17
index.js
|
@ -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);
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{
|
||||
"like if owned": "👍"
|
||||
"like if owned": "👍",
|
||||
"fortnite": "🤦"
|
||||
}
|
Loading…
Reference in a new issue