Search code examples
telegramtelegram-bot

Telegram group ban/boot/kick user


I need to create a Telegram bot to moderate a group and be able to ban/boot/kick users from the group.

I could not find anything in the Telegram API to boot a user from a group, how can a bot do this through the API?


Solution

  • You can use banChatMember to remove a user from a group.

    The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.