mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-23 03:16:48 +00:00
Fix non-working example in commands documentation.
This commit is contained in:
parent
78459f3ed0
commit
d124daef33
@ -422,7 +422,7 @@ By providing the converter it allows us to use them as building blocks for anoth
|
|||||||
class MemberRoles(commands.MemberConverter):
|
class MemberRoles(commands.MemberConverter):
|
||||||
async def convert(self, ctx, argument):
|
async def convert(self, ctx, argument):
|
||||||
member = await super().convert(ctx, argument)
|
member = await super().convert(ctx, argument)
|
||||||
return member.roles
|
return [role.name for role in member.roles[1:]] # Remove everyone role!
|
||||||
|
|
||||||
@bot.command()
|
@bot.command()
|
||||||
async def roles(ctx, *, member: MemberRoles):
|
async def roles(ctx, *, member: MemberRoles):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user