You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using this package to create cooldowns for certain commands that users run, and I want to be able to tell the user the amount of time they have to wait until they can run the command again.
I can't seem to find any way that this is possible with the current code.
We can get:
The time of the last drip with myLimiter.tokenBucket.lastDrip
We can then calculate the next drip time based on the last drip time + the interval length
But there does not seem to be a way to tell what the current time within an interval is. Therefore I cannot calculate how much time is left before the next drip.
EDIT: It seems like this could be solved by giving us access to the internal clock, specifically getMilliseconds(). Additionally, maybe we could have a method to getTimeToNextDrip() or getTimeToNextInterval()?
The text was updated successfully, but these errors were encountered:
I am using this package to create cooldowns for certain commands that users run, and I want to be able to tell the user the amount of time they have to wait until they can run the command again.
I can't seem to find any way that this is possible with the current code.
We can get:
myLimiter.tokenBucket.lastDrip
But there does not seem to be a way to tell what the current time within an interval is. Therefore I cannot calculate how much time is left before the next drip.
EDIT: It seems like this could be solved by giving us access to the internal clock, specifically getMilliseconds(). Additionally, maybe we could have a method to
getTimeToNextDrip()
orgetTimeToNextInterval()
?The text was updated successfully, but these errors were encountered: