diff --git a/tgbot/kollagen-bot/main.py b/tgbot/kollagen-bot/main.py index 63af7b0..e1325d4 100644 --- a/tgbot/kollagen-bot/main.py +++ b/tgbot/kollagen-bot/main.py @@ -180,6 +180,9 @@ class KollagenBot: check=True, capture_output=True, timeout=60, + env={ + 'NO_COLOR': "1" + } ) ntf.seek(0) @@ -218,11 +221,13 @@ class KollagenBot: if isinstance(update, Update): if isinstance(context.error, subprocess.CalledProcessError): - update.message.reply_text( - f"Something is fucked!\n{context.error.stderr.decode('utf-8')}" - ) + error_display = context.error.stderr.decode('utf-8') else: - update.message.reply_text(f"Something is fucked!\n{context.error}") + error_display = str(context.error) + error_display = error_display[:2500] + update.message.reply_text( + f"Something is fucked!\n{error_display}" + ) def start_idle(self): self.updater.start_polling()