aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-03-21 10:01:56 +0000
committerGravatar Gareth Coles <[email protected]>2018-03-21 10:01:56 +0000
commit8e672df3ff59d644584036c4ff632e710fb50108 (patch)
treeb1e0b1ff781830fb1f8505fb84c05f3ddc5605a2
parentPEP8, sorry :pensive: (diff)
[ClickUp] Fix errors when task text is too long
-rw-r--r--bot/cogs/clickup.py7
1 files changed, 6 insertions, 1 deletions
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"])