From 8e672df3ff59d644584036c4ff632e710fb50108 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Wed, 21 Mar 2018 10:01:56 +0000 Subject: [ClickUp] Fix errors when task text is too long --- bot/cogs/clickup.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bot/cogs/clickup.py b/bot/cogs/clickup.py index 03c1238f6..079678aa4 100644 --- a/bot/cogs/clickup.py +++ b/bot/cogs/clickup.py @@ -180,7 +180,12 @@ class ClickUp: lines = [first_line] if task.get("text_content"): - lines.append(task["text_content"]) + text = task["text_content"] + + if len(text) >= 1500: + text = text[:1497] + "..." + + lines.append(text) if task.get("assignees"): assignees = ", ".join(user["username"] for user in task["assignees"]) -- cgit v1.2.3