@client.command(pass_context = True)
async def ree(ctx):
if(ctx.message.author.name == "TheDogeKing_X#8429"):
await ctx.send("test completed")这不适用于某些原因
发布于 2020-04-07 10:50:24
如果您使用重写,则不使用(pass_context),并且它是ctx.author.name,而不是ctx.message.author.name。另外,如果您使用的是.name,则不要包含鉴别器(#8429)。据我所知,代码是:
@client.command() async def ree(ctx): if(ctx.author.name == "TheDogeKing_X"): await ctx.send("test completed")
我个人在检查该成员是否有某个名称方面经验不是很丰富,所以这可能仍然不起作用,但是,我确实把它放在正确的语法中。
https://stackoverflow.com/questions/60872540
复制相似问题