From ef7f5743060ab24405d0c380c58f4cf1eb29d990 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 29 Feb 2024 21:46:47 -0500 Subject: [PATCH] fix(pterodactyl): testing a fix to tellraw --- pterodactyl/pterodactyl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pterodactyl/pterodactyl.py b/pterodactyl/pterodactyl.py index aa3c9c2..4312e1f 100644 --- a/pterodactyl/pterodactyl.py +++ b/pterodactyl/pterodactyl.py @@ -28,7 +28,7 @@ class Pterodactyl(commands.Cog): startup_arguments=None, power_action_in_progress=False, chat_regex=r"\[(\d{2}:\d{2}:\d{2})\sINFO\]:\s<(\w+)>\s(.*)", - tellraw_json='tellraw @a ["",{{"text":".$U ","color":".$C"}},{{"text":" (DISCORD): ","color":"blue"}},{{"text":".$M","color":"white"}}]', + tellraw_json='tellraw @a ["",{"text":".$U ","color":".$C"},{"text":" (DISCORD): ","color":"blue"},{"text":".$M","color":"white"}]', api_endpoint="minecraft", chat_channel=None ) @@ -107,7 +107,7 @@ class Pterodactyl(commands.Cog): console = self.bot.get_channel(await self.config.console_channel()) if console is not None: await console.send(f"Server status changed! `{json.loads(message)['args'][0]}`") - except websockets.exceptions.ConnectionClosed as e: + except (websockets.exceptions.ConnectionClosed) as e: self.logger.info("WebSocket connection closed: %s", e) websocket_credentials = client.servers.get_websocket(server_id) continue