Commit graph

1 commit

Author SHA1 Message Date
Danny
9e50686983 feat: scripts/set-bot-presence.py for chat-side bot presence
Idempotent one-shot script that calls the Telegram Bot API to:
- set the persistent menu button → "Open Workout Tracker" launching
  the Mini App at $WEBAPP_URL
- publish a short description + long description so the chat tells
  users what to do before they /start (which now returns silence —
  we removed the polling bot)
- clear the published commands list (no more stale /start, /history,
  etc. in the / menu)

Loads BOT_TOKEN from env first, then ~/.secrets/bigbiggerbiggestbot
to match start.py. Pure-stdlib (urllib) so it has no extra deps.

The prod systemd unit gets an ExecStartPost hook for this (dotfiles
change in a sister commit). Errors are non-fatal — the dash prefix
on ExecStartPost means a failed presence update never blocks the
backend from being healthy.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 12:01:39 +02:00