Skip to content

Instantly share code, notes, and snippets.

@MaciejkaG
MaciejkaG / simple-discord.py-cooldown.md
Last active Dec 20, 2021
Discord.py command cooldown and error
View simple-discord.py-cooldown.md

Hi! Today, i will show you how to make simple command cooldown in Discord.py.

It's very simple, just must to add something under @bot.command: @commands.cooldown({how many can use per...}, {x seconds}, commands.BucketType.user) Example:

@bot.command()
@commands.cooldown(1, 10, commands.BucketType.user)
async def helloworld(ctx):
  await ctx.send('Hello world!')