When sending messages in groups with pyrogram sometimes errors like 420 SLOWMODE_WAIT_X or even 400 USER_BANNED_IN_CHANNEL occur.
Is there a way to check if the target allows sending a message from the client before using send_message()?
Unfortunately, ignoring those errors leads to a permanent account ban.
I’d be very glad if anyone could help.
I tried:
- using ChatMember.restricted_by (didn’t work for no reason)
- using Chat.is_restricted (didn’t for user-based restrictions)
New contributor
Unthought is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.