Add Pterodactyl cog #19
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue