chore(pterodactyl): bump version
Some checks are pending
Actions / Lint Code (Ruff & Pylint) (push) Waiting to run
Actions / Build Documentation (MkDocs) (push) Waiting to run

This commit is contained in:
cswimr 2025-02-21 10:27:10 -06:00
parent 6bd2a2cc68
commit 3fdb0836cf
Signed by: cswimr
GPG key ID: 0EC431A8DA8F8087
2 changed files with 9 additions and 1 deletions

View file

@ -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

View file

@ -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):