Add Pterodactyl cog #19

Merged
cswimr merged 139 commits from pterodactyl into main 2024-03-02 00:07:42 -05:00
Showing only changes of commit 9e63b4e798 - Show all commits

View file

@ -29,11 +29,8 @@ async def establish_websocket_connection(coginstance: Pterodactyl) -> None:
logger.debug("Authentication message sent")
coginstance.websocket = websocket
await loop(coginstance, websocket)
async def loop(coginstance: Pterodactyl, websocket: websockets.WebSocketClientProtocol) -> None:
current_status = ''
while True: # pylint: disable=too-many-nested-blocks
message = await websocket.recv()
if json.loads(message)['event'] in ('token expiring', 'token expired'):