Skip to content

Skelmis/Function-Cooldowns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A simplistic decorator based approach to rate limiting function calls.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages