Answer the question
In order to leave comments, you need to log in
How to make a cooldown for an event?
I make in my bot the so-called reputation parameter in the form of emoji. It is given by other people in two ways. One way is to add an emoji reaction to a user's message, and the second is to simply mention the person in the message with this emoji. But I need to have a cooldown for issuing reputation to the same person.
For example:
User A gave reputation to User B
User A gave reputation to user C
User A gave reputation to user D
User A gave reputation to User B
If reputation is given to others, then everything is fine. But if given to the same person, it needs a 5 minute cooldown. However, this should only work for User A, if the reputation is given by another, it should be added.
I'm only interested in the cooldown system itself. I'll deal with the rest myself.
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