From c546fa597b777e6eb94b40cc6065592ad2e309e1 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 14 Mar 2024 16:38:23 -0400 Subject: [PATCH] fix(pterodactyl): actually start the topic loop --- pterodactyl/pterodactyl.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pterodactyl/pterodactyl.py b/pterodactyl/pterodactyl.py index 5ad387f..ec20d7c 100644 --- a/pterodactyl/pterodactyl.py +++ b/pterodactyl/pterodactyl.py @@ -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