From c482c1d857c487cc903de0739c956bc6cb67764b Mon Sep 17 00:00:00 2001 From: blank X Date: Fri, 4 Sep 2020 15:45:54 +0700 Subject: [PATCH] Fix bug with caplength, I should get a dev branch --- redditbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redditbot.py b/redditbot.py index 9c0726a..f5c68b7 100644 --- a/redditbot.py +++ b/redditbot.py @@ -253,7 +253,7 @@ async def main(): else: if getattr(random_post, 'selftext', None): text += '\n' - caplength = 4096 - len(client.parse_mode.parse(text)[0]) + caplength = 4095 - len(client.parse_mode.parse(text)[0]) text += html.escape(random_post.selftext[:caplength]) await _start_broadcast([text], None, chats)