From 2e4b6647603401b15ffd5d054493fbcca4807d85 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 29 Feb 2024 21:11:16 -0500 Subject: [PATCH] fix(pterodactyl): maybe? --- pterodactyl/pterodactyl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pterodactyl/pterodactyl.py b/pterodactyl/pterodactyl.py index 5e93314..c00c077 100644 --- a/pterodactyl/pterodactyl.py +++ b/pterodactyl/pterodactyl.py @@ -83,9 +83,10 @@ class Pterodactyl(commands.Cog): if json.loads(message)['event'] == 'console output' and await self.config.console_channel() is not None: if current_status == 'running' or current_status == 'offline' or current_status == '': + content = self.remove_ansi_escape_codes(json.loads(message)['args'][0][:1900]) + channel = self.bot.get_channel(await self.config.console_channel()) if channel is not None: - content = self.remove_ansi_escape_codes(json.loads(message)['args'][0][:1900]) if content.startswith('['): content = pagify(content, delims=[" ", "\n"]) for page in content: