Add Speedtest cog #28
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ class Speedtest(commands.Cog):
|
|||
r = await self.run_speedtest()
|
||||
if await ctx.embed_requested():
|
||||
if isinstance(r, str):
|
||||
await msg.edit(embed=discord.Embed(description=f"An error occurred! {r}", color=await discord.Colour.red()))
|
||||
await msg.edit(embed=discord.Embed(description=f"An error occurred! {r}", color=discord.Colour.red()))
|
||||
return
|
||||
embed = discord.Embed(title="Speedtest Results", link=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")
|
||||
|
|
Loading…
Reference in a new issue