From 3fe4b3b9ba97e248bb2825a47854854bbb12ccb7 Mon Sep 17 00:00:00 2001 From: blank X Date: Fri, 4 Sep 2020 15:34:48 +0700 Subject: [PATCH] Show selftext in posts --- redditbot.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/redditbot.py b/redditbot.py index 914ee60..9c0726a 100644 --- a/redditbot.py +++ b/redditbot.py @@ -251,6 +251,10 @@ async def main(): files[a] = i + ext await _start_broadcast(captions, files, chats) else: + if getattr(random_post, 'selftext', None): + text += '\n' + caplength = 4096 - len(client.parse_mode.parse(text)[0]) + text += html.escape(random_post.selftext[:caplength]) await _start_broadcast([text], None, chats) def register(pattern):