Show selftext in posts

This commit is contained in:
blank X 2020-09-04 15:34:48 +07:00
parent 672732670d
commit 3fe4b3b9ba
1 changed files with 4 additions and 0 deletions

View File

@ -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):