From f51f5f5bcfcf445a1850a248f3eac65f24caaaa7 Mon Sep 17 00:00:00 2001 From: lifehackerhansol Date: Wed, 4 Sep 2024 09:38:38 -0700 Subject: [PATCH] generatemkey: pad zeroes to the return value The master key input UI wants 5 digits. Provide the user 5 digits with leading zeroes so as to not get confused. --- cogs/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/api.py b/cogs/api.py index 92d56ca..e976bfa 100644 --- a/cogs/api.py +++ b/cogs/api.py @@ -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.')