Function Cooldowns
A simplistic take on functional cooldowns.
pip install function-cooldowns
Example usage
A simplistic example, read more on the docs!
import cooldowns
...
@bot.slash_command(
description="Ping command",
)
@cooldowns.cooldown(1, 15, bucket=cooldowns.SlashBucket.author)
async def ping(interaction: nextcord.Interaction):
await interaction.response.send_message("Pong!")
Find more examples here.
For documentation, please see here.
This implements the leaky bucket algorithm
Support
Want realtime help? Join the discord here.
Funding
Want a feature added quickly? Want me to help build your software using this?
Sponsor me here
Metadata
Release files for function-cooldowns 2.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| function_cooldowns-2.2.0.tar.gz | 11.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| function_cooldowns-2.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.1 kB
Release files / function_cooldowns-2.2.0.tar.gz
| Download URL | function_cooldowns-2.2.0.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b9c9ed1dc4e4b5f4b0c90bf945f521db98622148cba69aa6f6ff1bb707ca703d
|
|
BLAKE2b-256 checksum How to use checksums |
58e5560bc1c01087b152511fc31ea6945dcdc9b9077573614edd60d0ad42ccef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.10.12 Linux/6.8.0-58-generic
|
Release files / function_cooldowns-2.2.0-py3-none-any.whl
| Download URL | function_cooldowns-2.2.0-py3-none-any.whl |
|---|---|
| Size | 19.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
91cabb1051c76748f7970bf7b979e17a89f2f8fdf505bc2b45f62d7d277debcc
|
|
BLAKE2b-256 checksum How to use checksums |
0e4a644242c934306c234e44fdf26bd2c8096da9b92ed3813658717738908305
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.10.12 Linux/6.8.0-58-generic
|