因此,基本上我正在尝试生成只有服务器所有者和服务器所有者授予权限的人才能使用的管理命令,但是我不能使用:
owner = discord.guild.owner_id
我找了别的方法,但什么也没找到。这是我的密码:
import discord
owner = guild.owner_id
operators = [owner]
@bot.command()
async def op(ctx, *new_operator):
global operators
if ctx.author.id in operators:
operators.append(new_operator)
await ctx.send("Successfully added a new operator")
else:
await ctx.send("Insufficient Permissions")
我希望将所有者id添加到列表中,但这不起作用,因为我遇到以下错误:
Class 'Guild' has no 'owner_id' member
目前没有回答
相关问题 更多 >
编程相关推荐