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?
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?
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.
True
. Do you know what fixed it for you? Also using banChatMember
has no effect. –
Ader To remove a user without banning them, use unbanChatMember
.
this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat.
© 2022 - 2024 — McMap. All rights reserved.