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