'get user's highest permission in discord.py

@destiny.command(aliases=["ui, whois"])
async def userinfo(ctx, user: discord.Member=None):

  if user == None:

    user = ctx.author

  boosted = time.strftime("%B %d, %Y %I-:%M %p", user.premium_since.utctimetuple())
  created = time.strftime("%B %d, %Y %I-:%M %p", user.created_at.utctimetuple())
  joined = time.strftime("%B %d, %Y %I-:%M %p", user.joined_at.utctimetuple())
  members = sorted(ctx.guild.members, key=lambda m: m.joined_at)
  joinpos = str(members.index(user)+1)

i want to get the highest permission of {user} (highestperm =) but dont know how



Solution 1:[1]

' '.join([str(p[0]).title() for p in user.guild_permissions]).lower().split()[0]

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 TheFungusAmongUs