【发布时间】:2021-03-30 08:24:52
【问题描述】:
好的,这段代码有问题,但我不明白是什么。
@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'!(这是错误)
【问题讨论】:
标签: discord discord.py-rewrite python-3.8