I was creating my bot discord when I got a missing permissions error, I was wondering if it was possible to not display the error if it’s only a permissions error.
Let me explain, the error starts with DiscordAPIError: Unknown Message and I thought that if (err.includes("DiscordAPIError: Unknown Message") return might work
>Solution :
Error Has a specific structure. You’re interested in the .message.
if (err.message.includes("DiscordAPIError: Unknown Message") return;