you're doing the command in the a Cog. all methods (functions) in a class (in this case, Cog) have their first set as self
which is the class itself.
Because you didn't passed "self" "ctx" is being used as it, basically your command is missing one parameter. Try this:
@commands.command()
@commands.has_permissions(ban_members=True)
async def ban(self, ctx, member : discord.Member, *, reason=None):
await member.ban(reason=reason)
Also, take into consideration that commands.has_permissions
works only on the current channel, you probably want to use commands.has_guild_permissions
instead
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…