使命令在上可执行;y由一个人引起的不和谐。py

2024-10-02 16:31:13 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图让我的代码只使用一个不一致ID。无论用户是否具有该不一致ID,它都会发送“你做到了!”

    @commands.command()
    async def boop(self, ctx):
        discord.Member.id=562041484174426127
        if discord.Member.id is ctx.author.id:
            await ctx.send("You did it!")
        else:
            ctx.send("You don't have permission!")

Tags: 代码用户selfyousendidasyncdef