Reputation: 29
is there a way to send all of the mentioned person's roles to a channel?
Start of my code:
@client.command()
@commands.has_role("Enhanced Permissions")
async def softban(ctx, user : discord.Member,
Not sure what to do next
Upvotes: 1
Views: 666
Reputation: 1373
roles = user.roles
roles = [role.name for role in roles]
await ctx.send(f"```{','.join(roles)}```"
This will fetch the roles belonging to user
and print them within codeblocks.
Upvotes: 1