A
A
arsfilinov2021-06-13 00:53:25
In contact with
arsfilinov, 2021-06-13 00:53:25

How to change a variable over time in a VK bot?

how to make a person activate the command, then it can be activated only after an hour, how to implement this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vindicar, 2021-06-13
@arsfilinov

Store in the database a pair of "User ID" - "time of the previous command sending", when sending a command, pull out the last time by the ID of the sender and see how much time has passed since then.
The details depend on the toolkit, but even on this forum this same question was asked a week or two ago.

P
Puma Thailand, 2021-06-13
@opium

Record in the database that in an hour

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question