fix silent onboarding drop-off in /addgamer flow
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 33s
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 33s
Set awaiting_addgamer_username as soon as the menu is shown so typing a username directly (without tapping the button) is handled instead of being silently ignored. Also stop reporting a valid username as "not found" when Lichess returns a non-404 error (rate limit/timeout), and surface an error message if the addgamer menu itself fails to send.
This commit is contained in:
parent
e9516f8664
commit
2a7385290e
3 changed files with 32 additions and 4 deletions
|
|
@ -52,6 +52,7 @@ TRANSLATIONS = {
|
|||
'addgamer_btn_add': "➕ Add player",
|
||||
'addgamer_btn_how': "❓ How to add a player?",
|
||||
'addgamer_prompt': "👤 <b>Enter the Lichess username of the player to track:</b>",
|
||||
'addgamer_menu_error': "❌ Something went wrong showing the menu. Please try /addgamer again, or just send the Lichess username directly.",
|
||||
'addgamer_after_help': (
|
||||
"Now send the Lichess username of the player you want to track.\n\n"
|
||||
"Example: <b>MagnusCarlsen</b>\n\n"
|
||||
|
|
@ -69,6 +70,7 @@ TRANSLATIONS = {
|
|||
'token_username_error': "❌ Failed to get username from token. Please try again.",
|
||||
'empty_username': "❌ Username cannot be empty. Please try again.",
|
||||
'user_not_found': "❌ Player {username} not found on Lichess. Check the spelling of the name.",
|
||||
'lichess_temporarily_unavailable': "⚠️ Lichess is temporarily unavailable. Please try again in a minute.",
|
||||
'gamer_already_added': "ℹ️ Player {username} is already being tracked.\n\nTo add another player, use /addgamer",
|
||||
|
||||
# Get gamers
|
||||
|
|
@ -189,6 +191,7 @@ TRANSLATIONS = {
|
|||
'addgamer_btn_add': "➕ Добавить игрока",
|
||||
'addgamer_btn_how': "❓ Как добавить игрока?",
|
||||
'addgamer_prompt': "👤 <b>Введите username игрока Lichess для отслеживания:</b>",
|
||||
'addgamer_menu_error': "❌ Не удалось показать меню. Попробуйте /addgamer ещё раз, либо просто отправьте username игрока Lichess напрямую.",
|
||||
'addgamer_after_help': (
|
||||
"Теперь отправьте username игрока Lichess, которого хотите отслеживать.\n\n"
|
||||
"Пример: <b>MagnusCarlsen</b>\n\n"
|
||||
|
|
@ -206,6 +209,7 @@ TRANSLATIONS = {
|
|||
'token_username_error': "❌ Не удалось получить username из токена. Попробуйте еще раз.",
|
||||
'empty_username': "❌ Username не может быть пустым. Попробуйте еще раз.",
|
||||
'user_not_found': "❌ Игрок {username} не найден на Lichess. Проверьте правильность написания имени.",
|
||||
'lichess_temporarily_unavailable': "⚠️ Lichess временно недоступен. Попробуйте, пожалуйста, через минуту.",
|
||||
'gamer_already_added': "ℹ️ Игрок {username} уже отслеживается.\n\nДля добавления следующего игрока воспользуйтесь /addgamer",
|
||||
|
||||
# Get gamers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue