From 3fdb0836cf298d22f2e85a9400ffc072849edeaa Mon Sep 17 00:00:00 2001 From: cswimr Date: Fri, 21 Feb 2025 10:27:10 -0600 Subject: [PATCH] chore(pterodactyl): bump version --- pterodactyl/mcsrvstatus.py | 8 ++++++++ pterodactyl/pterodactyl.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pterodactyl/mcsrvstatus.py b/pterodactyl/mcsrvstatus.py index 0d06f64..d677029 100644 --- a/pterodactyl/mcsrvstatus.py +++ b/pterodactyl/mcsrvstatus.py @@ -2,6 +2,14 @@ import aiohttp 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 session.get(f"https://api.mcsrvstat.us/2/{host}:{port}") as response: response = await response.json() # noqa: PLW2901 diff --git a/pterodactyl/pterodactyl.py b/pterodactyl/pterodactyl.py index 99891e0..cab4414 100644 --- a/pterodactyl/pterodactyl.py +++ b/pterodactyl/pterodactyl.py @@ -23,7 +23,7 @@ class Pterodactyl(commands.Cog): __author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"] __git__ = "https://www.coastalcommits.com/cswimr/SeaCogs" - __version__ = "2.0.6" + __version__ = "2.0.7" __documentation__ = "https://seacogs.coastalcommits.com/pterodactyl/" def __init__(self, bot: Red):