Added cut variant string in poll (200 symbols)

This commit is contained in:
localhost_frssoft 2022-09-12 00:51:28 +03:00
parent a84b2e38ba
commit 9726a0f784

View File

@ -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')])