From b7635f06f53619209aa4a16b3b52e8d2d732a2d3 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Wed, 28 Feb 2024 12:50:16 -0500 Subject: [PATCH] fix(pterodactyl): added a character limit to the channel.send call in the websocket method --- pterodactyl/pterodactyl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pterodactyl/pterodactyl.py b/pterodactyl/pterodactyl.py index 6a1eacb..bd1bb95 100644 --- a/pterodactyl/pterodactyl.py +++ b/pterodactyl/pterodactyl.py @@ -74,7 +74,7 @@ class Pterodactyl(commands.Cog): if json.loads(message)['event'] == 'console output' and await self.config.console_channel() is not None: channel = self.bot.get_channel(await self.config.console_channel) - await channel.send(json.loads(message)['args'][0]) + await channel.send(json.loads(message)['args'][0][:1900]) #FIXME - Add pagification for long messages to prevent Discord API errors except websockets.exceptions.ConnectionClosed as e: self.logger.debug("WebSocket connection closed: %s", e)