以下是给我带来问题的字符串:
@client.command(aliases=['unban'])
async def unban1(ctx, user: discord.User):
guild = ctx.guild
channel = ctx.message.channel
embed4 = discord.Embed(
title='Unbanning Member...',
description= f"{user} has been unbanned.",
colour=discord.Colour.teal()
)
if ctx.author.guild.guild_permissions.ban_members:
await channel.send (embed=embed4)
await guild.unban(user=user)
pass
我还没有准备好很多关于discord.py重写文档的内容,所以如果这是一个noob问题,请原谅,但是,请帮助!给出错误的问题在第10行
删除
.guild
它的Member.guild_permissions
而不是Member.guild.guild_permissions
相关问题 更多 >
编程相关推荐