fix(pterodactyl): actually start the topic loop

This commit is contained in:
Seaswimmer 2024-03-14 16:38:23 -04:00
parent 7b859e07e9
commit c546fa597b
Signed by untrusted user: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -27,12 +27,11 @@ class Pterodactyl(commands.Cog):
self.websocket: Optional[websockets.WebSocketClientProtocol] = None
self.retry_counter: int = 0
register_config(config)
async def cog_load(self) -> None:
self.retry_counter = 0
self.task = self.get_task()
self.update_topic.start()
async def cog_unload(self) -> None:
self.update_topic.cancel()
self.task.cancel()
self.retry_counter = 0
await self.client._session.close() # pylint: disable=protected-access