Answer the question
In order to leave comments, you need to log in
How to set a time limit for a command for a user in a VK bot?
It is necessary to make sure that a person cannot spam the bot with a command, it is necessary that there is some kind of timer, that is, a certain command can be called 5 times within 30 seconds, if more than 5 times, then this command is ignored. How to implement this using the example of this command:
if user_message == '!привет':
vk.messages.send(random_id = get_random_id(),
message = (f"@id{id} ( {first_name}), здарова крутыш"),
chat_id = event.chat_id)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question