@bot.command()
@commands.has_permissions(manage_messages=True)
#only those with the permission to manage messages can use this command
async def clear(ctx, amount: int):
await ctx.channel.purge(limit=amount + 1)
await ctx.send(f"{amount} message(s) got deleted")
删除所有的信息不是很好。我可以与您共享删除特定数量邮件的代码
要使用此选项,请使用[command][value] i、 e:清除10
相关问题 更多 >
编程相关推荐