I'm built a telegram bot for the groups.When the bot is added to the group, it will delete messages containing ads.How can I change the bot to work for only 30 days in each group and then stop it?
That means, for example, today's bot is added to group 1 and the next week the bot is added to group 2; I need to change the bot to stop the 30 days in group 1 and stop it in group 2 for another 37 days.
How can I do that?
You can't know how long your bot had been added to group at this time. :(
You need to log it to your own database, and there is leaveChat method if you need it.
How can a telegram bot change that works only for a specific time in a group?