Answer the question
In order to leave comments, you need to log in
How do I temporarily block users of my bot?
There is a telegram bot, I have no idea how to make the bot stop responding to specific people, or issue a message about a temporary block. On the Internet I did not find any information about this at all, I will be very grateful to anyone who can help.
Answer the question
In order to leave comments, you need to log in
As you were already told above, you need a table that will contain the id of blocked users, and with it the time for which you are going to restrict him from using your bot.
Every time a blocked user writes to your bot, check if the user's blocking time has passed and if so, remove him from this table and process his request.
But this is most likely not the best way, but as an option.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question