Kick the bot from a group
See original GitHub issueI was wondering if there’s a way to kick the bot from a group when added
I implemented my custom check to verify that a chat (group/channel) is allowed to have the bot in it and if the verification fails I would like the bot to kick itself from the chat
I found this
bot.execute(new KickChatMember(chatId, userId));
but i don’t think that this will help me at all or am I wrong?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Kick a Chat Member with the Telegram Bot API - Pipedream
Use this method to kick a user from a group, a supergroup or channel. [See the docs](https://core.telegram.org/bots/api#banchatmember) for more information.
Read more >How to auto remove/kick members from telegram channel or ...
Is there any way to do this task automatically, I mean can we remove/kick user from channel/group automatically or by scheduling? Any sample ......
Read more >How do I remove a bot from a group? : r/TelegramBots - Reddit
Yep, just like a normal persoon, use the kick button.
Read more >Add or remove people & bots from a space or group - Android
Add or remove people & bots from a space or group · Open the Chat app · Open a space or group conversation....
Read more >Kick All Members (@prkickallbot) Telegram Bot
This Bot Can Kick All Members From Your Group Must Start The Bot (Telegram Bot)
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
there’s a telegram API call as far as I know called
https://api.telegram.org/bot/leaveChat
where you can specify the chat_id of the chat to leaveyou can find more at https://core.telegram.org/bots/api#leavechat
The problem here is that I would like people to not add my bot to their group/channels and I found this call in the telegram api but not here in the java library
Yes but I am doing a filter on allowed chat manually to see if the bot should be in a group and the LeaveChat works perfectly