I’m developing a Telegram bot that sends notifications and tracks attendance for an upcoming game. I want to implement a /clean command that will erase the entire chat history for all users, essentially making it look like a new chat. This command should be available only to admins.
Here’s what I’ve done so far:
Created a bot using python-telegram-bot.
Implemented a command to delete messages sent by the bot.
However, I realized that the Telegram Bot API does not support deleting user messages. My goal is to completely clear the chat history, including messages sent by users, not just those sent by the bot.
Question:
Is there any way to programmatically clear the entire chat history, including user messages, via the Telegram Bot API? If not, what are the best practices or workarounds to achieve a similar result?
Additional Info:
I am aware that admins can manually clear the chat history for group chats.
I would prefer a solution that does not rely on manual actions from users or admins.
Any guidance or suggestions would be greatly appreciated.
What I’ve Tried:
Implementing a /clean command that deletes messages sent by the bot.
Informed users to manually clear their chat history.