From 9726a0f784b8e61351b3fd83543ed6bfab90e4a7 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Mon, 12 Sep 2022 00:51:28 +0300 Subject: [PATCH] Added cut variant string in poll (200 symbols) --- src/fmn_poll.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/fmn_poll.py b/src/fmn_poll.py index 1df3c85..d7083a0 100644 --- a/src/fmn_poll.py +++ b/src/fmn_poll.py @@ -25,6 +25,8 @@ def create_poll_movies(text=text_create_poll, poll_expires=345600): poll_option_string = f"{orig_name}, {year} ({acct})" if orig_name is None: poll_option_string = f"{ru_name}, {year} ({acct})" + if len(poll_option_string) >= 200: + poll_option_string = poll_option_string[0:199] # Обрезка на 200 символов. formated_poll_options.append(poll_option_string) poll_status_id = post_status(text, None, formated_poll_options, poll_expires=poll_expires, attachments=[upload_attachment('src/FMN.png')])