Answer the question
In order to leave comments, you need to log in
How to get the highest server role?
Hello! I would like to know how to get the highest role on the server.
Here is my code:
@client.command()
async def me(ctx):
emb = discord.Embed(title = 'Info', description = '{}|{}\n{}|{}'.format(ctx.guild.owner, "топ роль сервера", ctx.author.top_role.mention, ctx.author.mention), color = 0x00ff00)
await ctx.send(embed = emb)
Answer the question
In order to leave comments, you need to log in
Since the list of roles is returned sorted by position on the server , it is enough to simply get the last element of the list of roles:guild.roles[-1]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question