chore(pterodactyl): bump version
This commit is contained in:
parent
6bd2a2cc68
commit
3fdb0836cf
2 changed files with 9 additions and 1 deletions
|
@ -2,6 +2,14 @@ import aiohttp
|
||||||
|
|
||||||
|
|
||||||
async def get_status(host: str, port: int = 25565) -> tuple[bool, dict]:
|
async def get_status(host: str, port: int = 25565) -> tuple[bool, dict]:
|
||||||
|
"""Get the status of a Minecraft server using the [mcsrvstat.us API](https://api.mcsrvstat.us).
|
||||||
|
|
||||||
|
Args:
|
||||||
|
host (str): The host of the server.
|
||||||
|
port (int, optional): The port to connect to. Defaults to 25565.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A tuple containing a boolean and a dictionary. The boolean is True if the server is online, or False if it is offline. The dictionary contains the response from the API."""
|
||||||
async with aiohttp.ClientSession() as session:
|
async with aiohttp.ClientSession() as session:
|
||||||
async with session.get(f"https://api.mcsrvstat.us/2/{host}:{port}") as response:
|
async with session.get(f"https://api.mcsrvstat.us/2/{host}:{port}") as response:
|
||||||
response = await response.json() # noqa: PLW2901
|
response = await response.json() # noqa: PLW2901
|
||||||
|
|
|
@ -23,7 +23,7 @@ class Pterodactyl(commands.Cog):
|
||||||
|
|
||||||
__author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"]
|
__author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"]
|
||||||
__git__ = "https://www.coastalcommits.com/cswimr/SeaCogs"
|
__git__ = "https://www.coastalcommits.com/cswimr/SeaCogs"
|
||||||
__version__ = "2.0.6"
|
__version__ = "2.0.7"
|
||||||
__documentation__ = "https://seacogs.coastalcommits.com/pterodactyl/"
|
__documentation__ = "https://seacogs.coastalcommits.com/pterodactyl/"
|
||||||
|
|
||||||
def __init__(self, bot: Red):
|
def __init__(self, bot: Red):
|
||||||
|
|
Loading…
Add table
Reference in a new issue