ban_chat_member должен работать, а вот получение по id не будет работать, если диалога с этим пользователем раньше не было, для защиты от перебора людей в телеграмме. @bot.message_handler(text=TextFilter(equals='!start', ignore_case=True))message.from_user.id-> message.chat.id inline_message_id, но не message.If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present.
bot.send_message Третий параметр - parse_modemessage.chat.id, "Всего людей: ", len(rows)bot.send_message(message.chat.id, f"Всего людей: {len(rows)}")