Catch errors

This commit is contained in:
Skylar Grant 2023-03-11 14:47:54 -05:00 committed by GitHub
parent dbd66c248c
commit 51dbff6f28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -87,8 +87,7 @@ client.on('interactionCreate', async interaction => {
});
client.on('messageUpdate', async message => {
await fn.sleep(50);
await fn.messages.updateHandler(message);
await fn.messages.updateHandler(message).catch(e => console.error(e));
});
async function checkRateLimits(hi) {

View File

@ -523,7 +523,7 @@ const functions = {
},
async updateHandler(message) {
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
if (message.author.id != strings.ids.growATree) return;