diff --git a/redditbot.py b/redditbot.py index f5c68b7..b08bb64 100644 --- a/redditbot.py +++ b/redditbot.py @@ -252,9 +252,13 @@ async def main(): await _start_broadcast(captions, files, chats) else: if getattr(random_post, 'selftext', None): - text += '\n' - caplength = 4095 - len(client.parse_mode.parse(text)[0]) - text += html.escape(random_post.selftext[:caplength]) + caplength = 4094 - len(client.parse_mode.parse(text)[0]) + text += '\n\n' + captext = random_post.selftext[:caplength] + if len(captext) >= caplength: + captext = captext[:-1] + captext += '…' + text += html.escape(captext) await _start_broadcast([text], None, chats) def register(pattern):