Answer the question
In order to leave comments, you need to log in
How to check the date in the user's database every 24 hours, and if it is equal to today, disable his privileges?
My telegram bot has a paid subscription, but do I need to somehow keep track of the subscription date?
this is the crux of the matter!
since there are many commands in the bot that require an asset, time.sleep() is not suitable, and a lot of users need to check.
how to do it?
Answer the question
In order to leave comments, you need to log in
When a user receives or renews a subscription, set the end date in the database.
For any operations performed on a subscription, check that the user has this date greater than the current one. Enough condition for the select.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question