Skip to content

Commit

Permalink
Added whois command (rash version)
Browse files Browse the repository at this point in the history
  • Loading branch information
Endyya committed Nov 24, 2024
1 parent 1462d2c commit c2c418c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/SilicaAnimus/discord_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,13 @@ async def echo(ctx, *args):
async def my_roles(ctx):
await ctx.channel.send(str(ctx.author.roles))

@self.client.command()
async def whois(ctx, *args):
for role_mention in args:
role = get_object_mentionned(role_mention, ctx)
for member in role.members:
await ctx.channel.send(f'{member.name} is {role.name}')

# Events
@self.client.event
async def on_ready() -> None:
Expand Down

0 comments on commit c2c418c

Please # to comment.