好吧,这段代码有问题,但我不明白是什么。
@client.command(aliases=['killchat'])
async def nuke(ctx, amount=9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999, channeltwo : ctx.message.channel = None):
if channeltwo == None:
await ctx.channel.purge(limit=amount)
else:
await ctx.channeltwo.purge(limit=amount)
请帮帮我,我不明白为什么模块"ctx"没有属性"message"!(这是错误(
尝试ctx.message.author.channel
,API允许机器人清除的内容是有限的。您将无法清除该数量。此外,如果混乱者年龄超过2周,你也无法清除他们。