Catch errors
This commit is contained in:
parent
dbd66c248c
commit
51dbff6f28
3
main.js
3
main.js
@ -87,8 +87,7 @@ client.on('interactionCreate', async interaction => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
client.on('messageUpdate', async message => {
|
client.on('messageUpdate', async message => {
|
||||||
await fn.sleep(50);
|
await fn.messages.updateHandler(message).catch(e => console.error(e));
|
||||||
await fn.messages.updateHandler(message);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
async function checkRateLimits(hi) {
|
async function checkRateLimits(hi) {
|
||||||
|
@ -523,7 +523,7 @@ const functions = {
|
|||||||
},
|
},
|
||||||
async updateHandler(message) {
|
async updateHandler(message) {
|
||||||
if (message.partial) {
|
if (message.partial) {
|
||||||
message = await message.fetch();
|
message = await message.fetch().catch(e => console.error(e));
|
||||||
}
|
}
|
||||||
// Make sure the message is from Grow A Tree
|
// Make sure the message is from Grow A Tree
|
||||||
if (message.author.id != strings.ids.growATree) return;
|
if (message.author.id != strings.ids.growATree) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user