Changeset 23bddf3 in python-cinema-club-bot for commands/users.py
- Timestamp:
- Oct 10, 2024, 6:20:52 AM (5 weeks ago)
- Branches:
- master
- Children:
- 1f94544
- Parents:
- 8d2d5ac
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
commands/users.py
r8d2d5ac r23bddf3 17 17 EXPECTED_ONE_USER, USER_SET, USER_ADD, USER_REMOVE, ADD_MORE_USERS, \ 18 18 NEXT_MOVIE_USER, USER_NOT_FOUND, USER_CHOOSE, NO_USERS, \ 19 EVENT_USER_HAD_EVENT 20 from utils import context_init, create_users_string, normalize_username, \ 21 choose_next_user 19 EVENT_USER_HAD_EVENT, NEXT_MOVIE 20 from utils import context_init, create_users_string, choose_next_user 22 21 from predicates import has_finished_event 22 23 23 24 24 async def set_users( … … 87 87 users = context.chat_data["users"] = choose_next_user(users) 88 88 89 await update.message.reply_text(NEXT_MOVIE_USER.format(user=users[0])) 89 next_user_string = NEXT_MOVIE_USER.format(user=users[0]) 90 91 last_movie = context.chat_data["movies"][0] \ 92 if context.chat_data["movies"] != [] else None 93 94 if last_movie and last_movie["user"] == users[0]: 95 next_user_string += NEXT_MOVIE.format(movie=last_movie["title"]) 96 97 await update.message.reply_text(next_user_string) 90 98 91 99
Note:
See TracChangeset
for help on using the changeset viewer.