Skip to content

Telegram & Live Card ​

Telegram support consists of two independent pieces, both optional:

  1. Notifications β€” one message per transition: window opened, ping failed, weekly cap exhausted, connection recovered. Only transitions are sent, so a healthy day is silent. bot_token + chat_id is enough; poll can stay off.
  2. Commands β€” with poll = true, the watcher also long-polls getUpdates and answers /status, /ping, /ping glm, /stats, /schedule, /card, and /help. Replies are restricted to allow_chat_ids (defaults to chat_id). Bare words work too: status, ping.

Dedicated bot token for poll = true

A token that another process is already long-polling cannot be shared: a Telegram bot has exactly one update stream. Use a dedicated bot when poll = true. Notifications (piece 1) work fine with any token.

One Live Card, A Few Buttons ​

When [general] card = true (default), the bot keeps one pinned message that it edits in place instead of spamming a stream of status messages:

πŸ“Š limits

🟒 Codex · plus
5h     β–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘  14%    2h03m
weekly β–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘  18%        β€”

🟠 Command Code
5h     β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘   0%        β€”
weekly β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100%   23h27m

🟒 GLM · lite
5h     β–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘   1%    1h08m
weekly β–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘  32%    2d20h

updated 20:31 Β· next auto at 21:01
[πŸ”„ Refresh] [⏱ Ping]
[πŸ“ˆ Stats]  [πŸ—“ Schedule]
[πŸ†• New card] [πŸ”‡ Mute 8h]
  • Refresh reads usage right now (the automatic cadence is every 30 minutes, usage_interval), then edits the card in place.
  • Ping runs one tick: everything the watcher would do on its own schedule.
  • Stats / Schedule answer in a separate message.
  • πŸ†• New card (or /card, /ΠΊΠ°Ρ€Ρ‚ΠΎΡ‡ΠΊΠ°) deletes the old message and posts a fresh one at the bottom β€” edits keep a message where it was, and after a long day that is above the fold. Every new card is pinned, so it also stays on top.
  • Mute 8h silences routine messages for mute_hours (default 8); an escalation still gets through, because that is the one message worth waking up for.

The card only repaints when something actually changed β€” a new reading, a new decision, or a button β€” so it does not spend an edit per minute.

Pings that happen in the same tick are reported as one message, and network failures are counted per incident rather than per provider (network_notify_cooldown = "30m").

Language Detection (lang) ​

The bot speaks English and Russian. [telegram] lang = "auto" (default) follows the sender's Telegram language_code, so the same deployment answers a Russian client in Russian and an English one in English; "en" or "ru" pins everything. Notifications follow the owner's last seen language. The rest of the project β€” CLI output, docs, code β€” is English only.

Quiet Hours ​

Telegram has no server-side schedule, but every message can be sent with disable_notification β€” delivered, just silent. Set the ranges in local time and the bot stops buzzing inside them (replies included):

toml
[telegram]
quiet_hours = "12:00-08:00"          # wraps midnight
# quiet_hours = "23:00-07:00,13:00-14:00"   # several ranges

A malformed spec fails at startup instead of silently leaving the phone loud. silent = true still forces silence around the clock.

Formatting & Notifications ​

Replies use Telegram HTML: provider names in bold, meters in a monospace <pre> block, status icons per provider (🟒 ok, 🟠 weekly exhausted, πŸ”΄ error, βšͺ️ no data). If Telegram rejects an entity, the message is re-sent as plain text instead of being dropped:

🟒 codex · plus
5h      β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘  92%    2h44m
weekly  β–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘  33%     6d6h
3 reset credit(s) available

Russian client output:

🟒 codex · plus
5h      β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘  92%    2h44m
weekly  β–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘  33%     6d6h
3 сброс(Π°) Π² запасС

Transition notifications look like:

βœ… Codex β€” new window
gpt-5.6-luna Β· 12.0k tok Β· 6.9s
5h window until 21:45

Released under the MIT License.