mirror of
https://gitea.phreedom.club/localhost_frssoft/FMN_bot.git
synced 2024-11-22 07:51:30 +00:00
Added winned movie post after poll ends
This commit is contained in:
parent
f142d5451f
commit
e782cacf5a
|
@ -62,8 +62,23 @@ def get_winner_movie(poll_status_id=str):
|
|||
create_tie_breaker()
|
||||
else:
|
||||
movie = winned_movies[0]
|
||||
logger.warning("Победил " + str(movie))
|
||||
mark_as_watched_movie(movie[1], movie[2], movie[3])
|
||||
|
||||
acct_suggested = movie[0]
|
||||
orig_name = movie[1]
|
||||
ru_name = movie[2]
|
||||
year = movie[3]
|
||||
win_variant = f"{orig_name} / {ru_name}, {year}"
|
||||
if ru_name is None:
|
||||
win_variant = f"{orig_name}, {year}"
|
||||
if orig_name is None:
|
||||
win_variant = f"{ru_name}, {year}"
|
||||
text_winned = f'''Голосование завершилось! Победил вариант предложенный @{acct_suggested}:
|
||||
{win_variant}
|
||||
'''.replace('\t', '')
|
||||
|
||||
logger.warning("Победил " + str(movie))
|
||||
post_status(text_winned, attachments=[upload_attachment('src/FMN.png')])
|
||||
clear_all_states()
|
||||
reset_poll()
|
||||
|
||||
|
|
Loading…
Reference in a new issue