forked from Supositware/Haha-Yes
dosent throw a bunch of error
This commit is contained in:
parent
005cd1c46d
commit
68cfa021bb
1 changed files with 36 additions and 31 deletions
9
index.js
9
index.js
|
@ -75,7 +75,8 @@ client.registry
|
||||||
});
|
});
|
||||||
|
|
||||||
client.on("message", async (message) => {
|
client.on("message", async (message) => {
|
||||||
var customresponse = new SelfReloadJSON(`./tag/${message.guild.id}.json`);
|
try {
|
||||||
|
var customresponse = new SelfReloadJSON(`./tag/${message.guild.id}.json`)
|
||||||
var autoresponse = new SelfReloadJSON('./json/autoresponse.json');
|
var autoresponse = new SelfReloadJSON('./json/autoresponse.json');
|
||||||
|
|
||||||
let message_content = message.content.toLowerCase();
|
let message_content = message.content.toLowerCase();
|
||||||
|
@ -85,6 +86,7 @@ client.registry
|
||||||
if(customresponse[message_content])
|
if(customresponse[message_content])
|
||||||
message.channel.send(customresponse[message_content])
|
message.channel.send(customresponse[message_content])
|
||||||
|
|
||||||
|
|
||||||
// If autoresponse is enable send the response
|
// If autoresponse is enable send the response
|
||||||
if(autoresponse[message.channel.id] == 'enable') {
|
if(autoresponse[message.channel.id] == 'enable') {
|
||||||
// Reply with images as attachement
|
// Reply with images as attachement
|
||||||
|
@ -105,8 +107,11 @@ client.registry
|
||||||
} else if (message_content.includes("jeff")) {
|
} else if (message_content.includes("jeff")) {
|
||||||
message.react("496028845967802378")
|
message.react("496028845967802378")
|
||||||
}
|
}
|
||||||
|
}}
|
||||||
|
} catch(err) {
|
||||||
|
console.error(err)
|
||||||
}
|
}
|
||||||
}});
|
})
|
||||||
|
|
||||||
// Very basic starboard
|
// Very basic starboard
|
||||||
client.on('messageReactionAdd', async (reaction, message) => {
|
client.on('messageReactionAdd', async (reaction, message) => {
|
||||||
|
|
Loading…
Reference in a new issue