How to delete all messages in a bot chat so that Start appears?

21 views Asked by At

Is there any library or code that will help delete all messages at the end of the dialogue with the bot? P.S. I know that you can use: bot.delete_message(message.chat.id, message.id) but there are a lot of messages and it’s hard to catch them by each id. Perhaps someone can suggest a magic cycle to go through all chat messages and delete them? Maybe there is an interesting library with such functionality?

bot.delete_message(message.chat.id, message.id)

0

There are 0 answers