feat(pterodactyl): added support for changing channel topics

This commit is contained in:
SeaswimmerTheFsh 2024-03-14 16:26:31 -04:00
parent d6bccf20e9
commit 4135cd4f98
Signed by: cswimr
GPG key ID: B8953EC01E5C4063
3 changed files with 85 additions and 0 deletions

View file

@ -0,0 +1,10 @@
import aiohttp
async def get_status(host, port = 25565) -> tuple[bool, dict]:
async with aiohttp.ClientSession() as session:
async with session.get(f'https://api.mcsrvstat.us/2/{host}:{port}') as response:
response = await response.json()
if response['online']:
return (True, response)
return (False, response)