Add Speedtest cog #28
1 changed files with 2 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
||||||
import asyncio
|
import asyncio
|
||||||
import json
|
import json
|
||||||
import subprocess
|
import subprocess
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
import discord
|
import discord
|
||||||
from redbot.core import commands
|
from redbot.core import commands
|
||||||
|
@ -34,7 +35,7 @@ class Speedtest(commands.Cog):
|
||||||
]
|
]
|
||||||
return "\n".join(text)
|
return "\n".join(text)
|
||||||
|
|
||||||
async def run_speedtest(self) -> str | asyncio.Any:
|
async def run_speedtest(self) -> str | Any:
|
||||||
process = await asyncio.create_subprocess_exec(
|
process = await asyncio.create_subprocess_exec(
|
||||||
"speedtest", "-f json", "--accept-license",
|
"speedtest", "-f json", "--accept-license",
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
|
|
Loading…
Reference in a new issue