Skip to content

Commit

Permalink
generatemkey: 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 5, 2024
1 parent 814f4e2 commit f51f5f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cogs/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ async def generatemkey(self, ctx, device: str, month: int, day: int, inquiry: st
async with self.bot.session.get(apicall) as r:
if r.status == 200:
ret = await r.json()
return await ctx.send(f'{ctx.author.mention} Your key is {ret["key"]}.')
return await ctx.send(f'{ctx.author.mention} Your key is {ret["key"]:05}.')
else:
return await ctx.send(f'{ctx.author.mention} API returned error {r.status}. Please check your values and try again.')

Expand Down

0 comments on commit f51f5f5

Please sign in to comment.