I am trying to fix an error where the bot tries to send a message to a chat group but doesn't have administration permissions.
I need an if
statement like the one below before sending the message to the chat group, however this code is not working:
if bot.get_chat(Message.chat.id).permissions.can_send_messages:
bot.reply_to(NewMessage, response, parse_mode="HTML")
Do you know what is the best solution?