sam
0
Q:

is_on_cooldown discord.py

is_on_cooldown(Context)
'''
Context is the context for the command
is_on_cooldown returns a boolean operator of if the command mentioned is on cooldown.
You need to pass_context to use it
'''

EXAMPLE:
  
@client.command(pass_content=True)
async def notcool(ctx):
  for command in client.commands():
    await ctx.channel.send(ctx.is_on_cooldown(command))
    #This will send out the cooldown status of all the commands in the bot.
1

New to Communities?

Join the community