Skip to content

Commit

Permalink
feat: added an option to dnkl_remove to accept uuids
Browse files Browse the repository at this point in the history
  • Loading branch information
Amxgh committed May 25, 2024
1 parent 56de9ba commit 3b3433c
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/cogs/hypixel.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,26 @@ async def dnkl_add(self, ctx, name: str):
@option(
name="name",
description="The Minecraft username of the player who you want to remove from the do-not-kick-list",
required=True,
required=False,
input_type=str
)
async def dnkl_remove(self, ctx, name: str):
@option(
name="uuid",
description="The UUID of the player who you want to remove from the do-not-kick-list",
required=False,
input_type=str
)
async def dnkl_remove(self, ctx, name: str = None, uuid: str = None):
"""Remove a player from the do-not-kick-list"""
await ctx.respond(await String(string=name).dnklremove())
if not name and not uuid:
await ctx.respond("Please provide either the username or the UUID of the player you want to remove.")
return
if name and not uuid and len(name) > 16:
uuid = name
if uuid:
await ctx.respond(await String(uuid=uuid).dnklremove())
else:
await ctx.respond(await String(string=name).dnklremove())

@bridge.bridge_command(aliases=['dnkllist', 'dnkll'])
async def dnkl_list(self, ctx):
Expand Down

0 comments on commit 3b3433c

Please sign in to comment.