How to handle message deletions when the message in question is already gone?
Helo!
I ran into an issue where a message was already deleted and i cant get the bot to not throw an error "Unknown Message".
8 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Node version is v18.5.0
its a raw package as this is the only way i found that i am able to detect and track deletions from messages sent prior to the bots restart
There're partials for that
Catch the error. You can use try...catch or
<Promise>.catch()
that didnt work
Basic JS, Not related to discord.js
to be fair, i did mess with it before... i will check it out
a catch throws the same error when applied to the delete function
ill just look into using the partials and implement it normally.. maybe that way it works? will make sure to update
will try
seems that its not working fine. the catch was just too empty. if it cant delete a message, its not a big deal anyways. so i just return the catch