fix(pterodactyl): maybe?
Some checks failed
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 18s
Actions / Build Documentation (MkDocs) (pull_request) Successful in 21s

This commit is contained in:
Seaswimmer 2024-02-29 21:11:16 -05:00
parent 925e402819
commit 2e4b664760
Signed by: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -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 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 == '': 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()) channel = self.bot.get_channel(await self.config.console_channel())
if channel is not None: if channel is not None:
content = self.remove_ansi_escape_codes(json.loads(message)['args'][0][:1900])
if content.startswith('['): if content.startswith('['):
content = pagify(content, delims=[" ", "\n"]) content = pagify(content, delims=[" ", "\n"])
for page in content: for page in content: