Commit graph

25 commits

Author SHA1 Message Date
vrubelroman
b0173950b8 fix silent addgamer drop on restart and periodic-check backlog buildup
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 13s
Persist user_data (PicklePersistence) so an in-flight /addgamer username
prompt survives a bot restart instead of being silently swallowed by
handle_username when the in-memory awaiting flag is gone.

Collapse periodic-check backlog into a single request spanning the whole
missed gap instead of replaying it one period_minutes window at a time —
with enough tracked gamers sharing one RequestQueue, per-window replay
could never catch up and the checkpoint fell further behind indefinitely.
Notification period label now reflects the actual queried span (minutes/
hours/days) instead of the configured interval, so a weeks-old catch-up
no longer gets mislabeled as "for 15 minutes".
2026-07-04 18:33:45 +00:00
vrubelroman
f154d3d7c3 align /getgamers and stats-message tables, unify stats body into one code block
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 31s
- /getgamers: column-aligned monospace table (username, ratings, period).
- Per-mode stats (rating/wins/losses/draws): column-aligned block, dropped
  the meaningless multi-game average accuracy row.
- format_stats_response/format_period_notification now wrap the whole
  message in a single markdown code block instead of alternating
  plain-text headers and separately-fenced tables.
- Rating row gets an emoji prefix to match the other three rows, so
  Telegram's monospace rendering keeps all values in the same column.
2026-07-03 13:20:50 +00:00
vrubelroman
2a7385290e fix silent onboarding drop-off in /addgamer flow
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.
2026-07-03 12:23:40 +00:00
vrubelroman
d479e14bf9 add per-game accuracy and outcome table to stats/notifications
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 31s
Games-of-period responses can now include a per-game breakdown
(include_games) with Lichess post-analysis accuracy, plus which side
the tracked player was on and their rating change for that game.

- lichess_client.py requests accuracy=true from Lichess; stats_service
  computes per-mode average accuracy and builds GameRow entries
  (tracked_is_white, tracked_rating_diff) for blitz/rapid/classical
- /games/{username}/period gained an include_games query param
- formatters.py renders a column-aligned monospace table per game:
  outcome circle (win/loss/draw relative to the tracked player),
  rating change, accuracy, names/ratings, result — for today/yesterday
  and periodic notifications; week keeps an aggregate accuracy line
- usernames are Markdown-escaped before formatting since messages are
  now sent with parse_mode='Markdown'
2026-07-03 09:38:51 +00:00
vrubelroman
6ed6ab866e добавлены картинки с подсказкой как добавить игрока 2025-12-03 02:33:38 +03:00
vrubelroman
ce586dcddb ↳ (активный игрок меняется в меню /getgamers) - удалили этот текст 2025-12-01 15:12:31 +03:00
vrubelroman
31ed5cf114 еще больше упростил стартовый текст 2025-12-01 14:29:07 +03:00
vrubelroman
f458044543 убран блок информации из /start в /help 2025-12-01 13:52:26 +03:00
vrubelroman
f08bc3a1dc bold text in /addgamer 2025-11-28 18:11:13 +03:00
vrubelroman
d04a08936c /addgamer выдает страничку игрока 2025-11-23 16:53:12 +03:00
vrubelroman
595c9419f4 проверка на дубликаты и ряд багов 2025-11-23 01:46:12 +03:00
vrubelroman
776f4f2c1f trivial bug fix design 2025-11-21 23:43:53 +03:00
vrubelroman
30fca57382 redisign /start 2025-11-21 23:35:44 +03:00
vrubelroman
965b8775b7 add command /profile 2025-11-21 23:16:35 +03:00
vrubelroman
123749415a switch ru/en 2025-11-20 12:43:00 +03:00
vrubelroman
141022727d /addgamer after /addgamer 2025-11-18 14:23:54 +03:00
vrubelroman
0e66a05b90 delete activ status 2025-11-16 23:36:57 +03:00
vrubelroman
c39bb33282 messages when doing questions 2025-11-16 23:10:08 +03:00
vrubelroman
5a8c705d54 /today /yesterday ... view all stats of gamers 2025-11-16 22:49:56 +03:00
vrubelroman
14db5765a5 add about /support in /start 2025-11-16 22:17:44 +03:00
vrubelroman
d23f026b19 add versions 2025-11-16 21:36:48 +03:00
vrubelroman
13a83b9fbd add cases delgamer 2025-11-16 20:44:02 +03:00
vrubelroman
5c69859868 add /support 2025-11-16 20:23:01 +03:00
vrubelroman
d52e962022 fix /start and lastYear_or_1000games 2025-11-16 20:07:52 +03:00
vrubelroman
3362bf89e2 EN language only 2025-11-12 23:20:01 +03:00