Tree:
667d2b384b
1.2.x
async
auto/crowdin
docs/guide
feature/ext-tasks
feature/threads
legacy
master
neo-docs
task-heartbeat
v1.3.x
v1.4.x
v1.5.x
v1.x
v2.1.x
v2.2.x
v2.3.x
v0.1.0
v0.10.0
v0.11.0
v0.12.0
v0.13.0
v0.14.0
v0.14.1
v0.14.2
v0.14.3
v0.15.0
v0.15.1
v0.16.0
v0.16.1
v0.16.10
v0.16.11
v0.16.12
v0.16.2
v0.16.3
v0.16.4
v0.16.5
v0.16.6
v0.16.7
v0.16.8
v0.16.9
v0.2.0
v0.2.1
v0.3.0
v0.4.0
v0.4.1
v0.5.0
v0.5.1
v0.6.0
v0.6.1
v0.6.2
v0.6.3
v0.7.0
v0.8.0
v0.9.0
v0.9.1
v0.9.2
v1.0.0
v1.0.1
v1.1.0
v1.1.1
v1.2.0
v1.2.1
v1.2.2
v1.2.3
v1.2.4
v1.2.5
v1.3.0
v1.3.1
v1.3.2
v1.3.3
v1.3.4
v1.4.0
v1.4.1
v1.4.2
v1.5.0
v1.5.1
v1.6.0
v1.7.0
v1.7.1
v1.7.2
v1.7.3
v2.0.0
v2.0.1
v2.1.0
v2.1.1
v2.2.0
v2.2.1
v2.2.2
v2.2.3
v2.3.0
v2.3.1
v2.3.2
v2.4.0
v2.5.0
v2.5.1
v2.5.2
${ noResults }
1 Commits (667d2b384beb967a3ce5ee9c307a740d1357f59e)
Author | SHA1 | Message | Date |
---|---|---|---|
|
cd0de57d13 |
[commands] Implement a command cooldown system.
The way the command cooldown works is using a windowed way of doing it. That is, if we have a cooldown of 2 commands every 30 seconds then if we do a single command, we have 30 seconds to do the second command or else we will get rate limited. This more or less matches the common expectations on how cooldowns should be. These cooldowns can be bucketed up to a single dimension of depth for a per-user, per-guild, or per-channel basis. Of course, a global bucket is also provided. These cannot be mixed, e.g. no per-channel per-user cooldowns. When a command cooldown is triggered, the error handlers will receive a an exception of type CommandOnCooldown with proper information regarding the cooldown such as retry_after and the bucket information itself. |
9 years ago |