From 51ec866647b5795e555cb6c1b27b2aabc53404bd Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Fri, 10 Jun 2022 12:30:24 -0600 Subject: [PATCH] Fix error on titles 256 characters, closes #147 --- jarvis/cogs/reddit.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jarvis/cogs/reddit.py b/jarvis/cogs/reddit.py index 9ecdf87..ff87bca 100644 --- a/jarvis/cogs/reddit.py +++ b/jarvis/cogs/reddit.py @@ -54,7 +54,9 @@ class RedditCog(Extension): author_url = f"https://reddit.com/u/{post.author.name}" author_icon = post.author.icon_img images = [] - title = f"{post.title}" + title = post.title + if len(title) > 256: + title = title[253] + "..." fields = [] content = "" og_post = None