Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bot.banChatMember(chatId, userId, { revoke_messages: true }) => no messages are getting deleted. #1245

Open
iservy opened this issue Dec 17, 2024 · 1 comment

Comments

@iservy
Copy link

iservy commented Dec 17, 2024

Below is the corrected and clarified version:


Hi,

I’m experiencing an issue with node-telegram-bot-api when using bot.banChatMember alongside the revoke_messages option. According to the Telegram Bot API documentation, setting revoke_messages: true should delete the user’s recent messages (from the past 48 hours) after they are banned in a supergroup.

However, no messages are being removed at all.

For example, the following code results in a successful ban but does not delete the user’s recent messages:

bot.banChatMember(chatId, userId, { revoke_messages: true });

The bot has all the necessary admin rights (including the ability to delete messages), and the chat is confirmed to be a supergroup.

Could you please provide guidance or confirm whether this is a known issue? Any help would be greatly appreciated.

@iservy iservy changed the title bot.banChatMember(chatId, userId, { revoke_messages: true }); bot.banChatMember(chatId, userId, { revoke_messages: true }) => no messages are getting deleted. Dec 17, 2024
@IsmailBinMujeeb
Copy link

can you provide a video? for conformation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants