hex: better uppercase

This commit is contained in:
Ave Ozkal 2019-06-17 19:11:08 +03:00
parent 941270a586
commit 9ca55a5461
No known key found for this signature in database
GPG key ID: 09356ABAA42C842B

View file

@ -17,7 +17,8 @@ class Basic(Cog):
@commands.command(name="hex")
async def _hex(self, ctx, num: int):
"""Converts base 10 to 16 (for emummc sector calculation)"""
await ctx.send(f"{ctx.author.mention}: {hex(num).upper()}")
hex_val = hex(num).upper().replace("0X", "0x")
await ctx.send(f"{ctx.author.mention}: {hex_val}")
@commands.guild_only()
@commands.command()