Skip to content

Commit

Permalink
mkey: pad zeroes to the return value
Browse files Browse the repository at this point in the history
The master key input UI wants 5 digits. Provide the user 5 digits with
leading zeroes so as to not get confused.
  • Loading branch information
lifehackerhansol committed Sep 4, 2024
1 parent ae9e550 commit 62686ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cogs/assistance.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ async def mkey(self, ctx: KurisuContext, device: Literal['3ds', 'dsi', 'wii', 'w
async with self.bot.session.get(api_call) as r:
if r.status == 200:
ret = await r.json()
return await ctx.send(f'{ctx.author.mention if not ctx.interaction else ""} Your key is {ret["key"]}.', ephemeral=True)
return await ctx.send(f'{ctx.author.mention if not ctx.interaction else ""} Your key is {ret["key"]:05}.', ephemeral=True)
else:
return await ctx.send(f'{ctx.author.mention if not ctx.interaction else ""} API returned error {r.status}. Please check your values and try again.', ephemeral=True)

Expand Down

0 comments on commit 62686ed

Please sign in to comment.