Answer the question
In order to leave comments, you need to log in
How to get all user roles on the server?
Good evening everyone! How to get a list of roles from a user?
I do it like this:
@Bot.command(aliases = ['i', 'information', 'INFO', 'INFORMATION'])
async def info(ctx, member: discord.Member):
mentions = [role.mention for role in member.roles if role.mentionable]
embed = discord.Embed(title = "Info", color = 0x428325)
embed.add_field(name = "Когда присоединился: ", value = member.joined_at)
embed.add_field(name = "Имя юзера: ", value = member.display_name)
embed.add_field(name = "Роли имеет: ", value = "\n".join(mentions))
embed.set_thumbnail(url = member.avatar_url)
embed.set_footer(text = "supports by quantprod")
await ctx.send(embed = embed)
Answer the question
In order to leave comments, you need to log in
solution: https://stackoverflow.com/questions/62328643/disco...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question