Forum Discussion

firstteam's avatar
firstteam
Copper Contributor
May 16, 2021

Possibly check blocked state instead of exception

Once a user blocked the bot, and when a message is sent to that user, the exception(Forbidden) was thrown. Is there any possible way to check whether the user has blocked or not, instead of catching the exception?
So maybe something like if(user.hasblocked()) {}....?

Resources