mirror of
https://gitea.phreedom.club/localhost_frssoft/FMN_bot.git
synced 2024-12-23 20:29:48 +00:00
Added cut variant string in poll (200 symbols)
This commit is contained in:
parent
a84b2e38ba
commit
9726a0f784
@ -25,6 +25,8 @@ def create_poll_movies(text=text_create_poll, poll_expires=345600):
|
|||||||
poll_option_string = f"{orig_name}, {year} ({acct})"
|
poll_option_string = f"{orig_name}, {year} ({acct})"
|
||||||
if orig_name is None:
|
if orig_name is None:
|
||||||
poll_option_string = f"{ru_name}, {year} ({acct})"
|
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)
|
formated_poll_options.append(poll_option_string)
|
||||||
poll_status_id = post_status(text, None, formated_poll_options,
|
poll_status_id = post_status(text, None, formated_poll_options,
|
||||||
poll_expires=poll_expires, attachments=[upload_attachment('src/FMN.png')])
|
poll_expires=poll_expires, attachments=[upload_attachment('src/FMN.png')])
|
||||||
|
Loading…
Reference in New Issue
Block a user