From 09d48082e5967fbe2c630b183dd9d75763a25f8b Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Wed, 28 Feb 2024 11:54:16 -0500 Subject: [PATCH] Revert "fix(pterodactyl): awaited a coroutine" This reverts commit 08cd13d7c71aa4ccb48b50bcb400c292bc7f03bc. --- pterodactyl/pterodactyl.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pterodactyl/pterodactyl.py b/pterodactyl/pterodactyl.py index 35bba92..3e7bfbe 100644 --- a/pterodactyl/pterodactyl.py +++ b/pterodactyl/pterodactyl.py @@ -74,11 +74,11 @@ class Pterodactyl(commands.Cog): websocket_credentials = client.servers.get_websocket(server_id) continue - async def get_task(self): - return self.bot.loop.create_task(await self.establish_websocket_connection(), name="Pterodactyl Websocket Connection") + def get_task(self): + return self.bot.loop.create_task(self.establish_websocket_connection(), name="Pterodactyl Websocket Connection") async def cog_load(self): - self.task = await self.get_task() + self.task = self.get_task() async def cog_unload(self): self.task.cancel() @@ -99,7 +99,7 @@ class Pterodactyl(commands.Cog): await ctx.send(f"Base URL set to {base_url}") self.logger.debug("Configuration value set: base_url = %s\nRestarting task...", base_url) self.task.cancel() - self.task = await self.get_task() + self.task = self.get_task() @pterodactyl_config.command(name = "apikey") async def pterodactyl_config_api_key(self, ctx: commands.Context, api_key: str): @@ -108,7 +108,7 @@ class Pterodactyl(commands.Cog): await ctx.send(f"API key set to `{api_key[:5]}...{api_key[-4:]}`") self.logger.debug("Configuration value set: api_key = %s\nRestarting task...", api_key) self.task.cancel() - self.task = await self.get_task() + self.task = self.get_task() @pterodactyl_config.command(name = "serverid") async def pterodactyl_config_server_id(self, ctx: commands.Context, server_id: str): @@ -117,4 +117,4 @@ class Pterodactyl(commands.Cog): await ctx.send(f"Server ID set to {server_id}") self.logger.debug("Configuration value set: server_id = %s\nRestarting task...", server_id) self.task.cancel() - self.task = await self.get_task() + self.task = self.get_task()