Python
- 1 ответ
- 0 вопросов
1
Вклад в тег
@bot.message_handler(commands=['kick'])
def ban_user(message):
can_restrict = bot.get_chat_member(message.chat.id, message.from_user.id).can_restrict_members
if can_restrict == True:
bot.ban_chat_member(chat_id=message.chat.id, user_id=message.reply_to_message.from_user.id)