Skip to content

Latest commit

 

History

History
48 lines (28 loc) · 987 Bytes

readme.md

File metadata and controls

48 lines (28 loc) · 987 Bytes

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