【发布时间】:2020-11-28 08:41:32
【问题描述】:
所以我试图发出一个只有我和另一个人可以关闭机器人的注销命令,
trusted = {id, id}
@commands.command()
async def test(self, ctx):
if ctx.author.id in trusted:
await ctx.send(f"{ctx.author.mention} Closing Bot")
await self.bot.close()
else:
await ctx.send("Only (me) and (my friend) can execute this")
出于某种原因,每当我尝试这样做时,它都没有意识到我是受信任的并且不会执行。
【问题讨论】:
标签: python discord.py