fix(pterodactyl): maybe?
All checks were successful
Actions / Lint Code (Ruff & Pylint) (pull_request) Successful in 18s
Actions / Build Documentation (MkDocs) (pull_request) Successful in 22s

This commit is contained in:
Seaswimmer 2024-03-01 15:02:42 -05:00
parent 8b50c0376d
commit a166168507
Signed by: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -36,7 +36,7 @@ class Pterodactyl(commands.Cog):
async def get_task(self) -> asyncio.Task: async def get_task(self) -> asyncio.Task:
from pterodactyl.websocket import establish_websocket_connection from pterodactyl.websocket import establish_websocket_connection
task = self.bot.loop.create_task(establish_websocket_connection(self), name="Pterodactyl Websocket Connection") task = self.bot.loop.create_task(establish_websocket_connection(self), name="Pterodactyl Websocket Connection")
task.add_done_callback(await self.error_callback) task.add_done_callback(self.error_callback)
return task return task
async def error_callback(self, fut) -> None: #NOTE - Thanks flame442 and zephyrkul for helping me figure this out async def error_callback(self, fut) -> None: #NOTE - Thanks flame442 and zephyrkul for helping me figure this out