A simplistic decorator based approach to rate limiting function calls.
Project description
Function Cooldowns
A simplistic take on functional 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.
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
function-cooldowns-1.5.0.tar.gz
(12.2 kB
view hashes)
Built Distribution
Close
Hashes for function_cooldowns-1.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22311758221823d986c721d939d94c8270aeedacd7257e0e4e433389a14c1f90 |
|
MD5 | 8b90aa5ea08fdba87f38acbbcd74a7b0 |
|
BLAKE2b-256 | 38479815ec19341afced77399c9cd43c83ac9b7fd895fb584ddf671ff895ad5d |