Skip to main content

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)

Source distribution for function-cooldowns 2.2.0
File Size Uploaded
function_cooldowns-2.2.0.tar.gz 11.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for function-cooldowns 2.2.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

2.2.0 This release

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.0

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page