summaryrefslogtreecommitdiff
path: root/commands/users.py
diff options
context:
space:
mode:
Diffstat (limited to 'commands/users.py')
-rw-r--r--commands/users.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/commands/users.py b/commands/users.py
index 9dcc125..8808bf6 100644
--- a/commands/users.py
+++ b/commands/users.py
@@ -16,11 +16,11 @@ from collections import deque
from strings import USER_NOT_PROVIDED, USERS_ADDED, USERS_REMOVED, \
EXPECTED_ONE_USER, USER_SET, USER_ADD, USER_REMOVE, ADD_MORE_USERS, \
NEXT_MOVIE_USER, USER_NOT_FOUND, USER_CHOOSE, NO_USERS, \
- EVENT_USER_HAD_EVENT
-from utils import context_init, create_users_string, normalize_username, \
- choose_next_user
+ EVENT_USER_HAD_EVENT, NEXT_MOVIE
+from utils import context_init, create_users_string, choose_next_user
from predicates import has_finished_event
+
async def set_users(
update: Update,
context: ContextTypes.DEFAULT_TYPE
@@ -86,7 +86,15 @@ async def who_is_next(
if has_finished_event(context, users[0]):
users = context.chat_data["users"] = choose_next_user(users)
- await update.message.reply_text(NEXT_MOVIE_USER.format(user=users[0]))
+ next_user_string = NEXT_MOVIE_USER.format(user=users[0])
+
+ last_movie = context.chat_data["movies"][0] \
+ if context.chat_data["movies"] != [] else None
+
+ if last_movie and last_movie["user"] == users[0]:
+ next_user_string += NEXT_MOVIE.format(movie=last_movie["title"])
+
+ await update.message.reply_text(next_user_string)
async def remove_users(