'Discord.py delay time send
I was wondering with this delay string of code is there anyway to send the message to users saying how long the delay they are going to wait is?
@commands.cooldown(rate=1, per=5, type=commands.BucketType.user)
Solution 1:[1]
yes we can send msg regarding how much time is left in cooldown like i have done below :
@command_name.error
async def command_error(ctx, error):
if isinstance(error, commands.CommandOnCooldown):
em = discord.Embed(title=f"command is on cooldown",description=f"Try again in {error.retry_after:.2f}s.", color=0xFFFF00)
await ctx.send(embed=em)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Dj Walkzz |
