add hypixel level

This commit is contained in:
TheTechRobo 2021-06-06 17:17:54 -04:00
parent 63600fc48b
commit c11682477c
1 changed files with 4 additions and 1 deletions

5
bot.py
View File

@ -48,6 +48,7 @@ async def ping(ctx):
await pong.edit(content=f':ping_pong: Pong! ({delta} ms)\n*Finding Discord message edit latency...*')
hi2 = time.time()
await pong.edit(content=f':ping_pong: Pong! ({delta} ms)\n*Discord message edit latency: {hi2 - hi1}*')
def sqrt(num): return num ** 0.5
@bot.command(name="hypixel",aliases=("h","stats"))
async def hypixel(ctx,player,ConvertToUUID=True):
"""
@ -67,7 +68,9 @@ async def hypixel(ctx,player,ConvertToUUID=True):
title=f"{contents['displayname']}'{_('s Hypixel Stats')}",
footer=_("Thanks for using Hypibot!"))
em.add_field(name=_("UUID"),value=getuuid(player),inline=True)
em.add_field(name="Rank", value=contents['rank'],inline=True)
em.add_field(name=_("Rank"), value=contents['rank'],inline=True)
networkEXP = contents['networkExp']
em.add_field(name=_("Network Level"),value=f"{(sqrt((2 * networkEXP) + 30625) / 50) - 2.5} ({_('raw')} {contents['networkExp']})",inline=True)
await thing.edit(embed=em, content="Player data down below.")
# }}}
# {{{ Run bot