feat(pterodactyl): added support for changing channel topics
This commit is contained in:
parent
d6bccf20e9
commit
4135cd4f98
3 changed files with 85 additions and 0 deletions
10
pterodactyl/mcsrvstatus.py
Normal file
10
pterodactyl/mcsrvstatus.py
Normal 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)
|
Loading…
Add table
Add a link
Reference in a new issue