fix(speedtest): fixed another keyerror

This commit is contained in:
Seaswimmer 2024-05-25 17:40:46 -04:00
parent eb41c1a72b
commit e88cba6cf4
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -63,7 +63,7 @@ class Speedtest(commands.Cog):
embed = discord.Embed(title="Speedtest Results", url=r["result"]["url"], color=await ctx.embed_color())
embed.add_field(name="Bandwidth", value=f"{r['download']['bandwidth'] / 1_000_000:.2f} Mbps down, {r['upload']['bandwidth'] / 1_000_000:.2f} Mbps up")
embed.add_field(name="Ping", value=f"Base: {round(r['ping']['latency'])} ms \nDownload: {round(r['download']['latency']['iqm'])} ms \nUpload: {round(r['upload']['latency']['iqm'])} ms")
embed.set_image(url=r["result"]["image"] + ".png")
embed.set_image(url=r["result"]["url"] + ".png")
await msg.edit(embed=embed)
else:
if isinstance(r, str):