【发布时间】:2020-08-23 14:29:08
【问题描述】:
@client.command()
@commands.has_permissions(administrator=True)
@commands.cooldown(1, 60, commands.BucketType.user)
async def nuke(ctx, amount=500):
await ctx.channel.purge(limit=amount + 1)
await ctx.send(f'Channel has been Nuked!')
@nuke.error
async def nuke_error(ctx, error):
if isinstance(error, commands.MissingPermissions):
await ctx.send('You do not have permissions to use this command!')
只是想知道如何为此添加冷却消息,说:“您必须等待 60 秒才能再次使用此命令!”
【问题讨论】:
标签: python discord discord.py