我正试图让我的机器人创建邀请
invite = await bot.create_invite()
这会导致错误'bot' object has no Attribute 'create_invite'
我正在使用Discord.py Rewrite。
谢谢!
答案 0 :(得分:1)
答案 1 :(得分:1)
您需要指定要邀请的对象,因为该漫游器当前没有邀请对象:
@bot.command()
async def createinv(ctx):
invite = ctx.channel.create_invite()
await ctx.send(f"Here's your invite: {invite}")
参考: