I am doing a discord bot and some commands have different cooldowns. I wanna know how to make a command that shows all these remaining times.
@bot.command()
@cooldown(1, 3600, BucketType.user)
async def FirstOne(ctx):
...
@FirstOne.error
async def FirstOne_error(ctx, error):
if isinstance(error, commands.CommandOnCooldown):
msg = 'Try again in {:.0f} seconds'.format(error.retry_after)
await ctx.send(msg)
else:
raise error
The code I wanna is something like this:
@bot.command()
async def timer(ctx):
await ctx.send() #FirstOne_error's msg
question from:
https://stackoverflow.com/questions/65906138/how-to-do-a-timer-command-to-show-all-cooldown-times-remaining-from-error-handle 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…