Нужно что-бы пока выполняется команда, нельзя было ее выполнить
Столкнулся с проблемой. Мне нужно что-бы пока выполнялась команда, нельзя было ее выполнить еще раз.
@bot.command(description = "Hidden in the Sand")
async def music(ctx):
time.sleep(1)
await ctx.send("We were playing in the sand")
time.sleep(4)
await ctx.send("And you found a little band")
time.sleep(4)
await ctx.send("You told me you fell in love with it")
time.sleep(3)
await ctx.send("Hadn't gone as I'd planned")
time.sleep(4)
await ctx.send("When you had to bid adieu")
time.sleep(4)
await ctx.send("Said you'd never love anew")
time.sleep(4)
await ctx.send("I wondered if I could hold it")
time.sleep(3)
await ctx.send("And fall in love with it too")
time.sleep(4)
await ctx.send("You told me to buy a pony")
time.sleep(3)
await ctx.send("But all I wanted was you")
Ответы (1 шт):
Автор решения: Donan
→ Ссылка
Я нашел ответ:
@commands.cooldown(1, (Время задержки), commands.BucketType.user)
