Tech

tg-digest — A Read-Only Telegram Channel Digester You Drive From a Bot

Pavneet Logo pavnxet October 19, 2026 4 min read
tg-digest Cover

What it is

tg-digest is a read-only Telegram user bot that reads the text of the channels you choose, for a time window you choose, and writes it to one structured JSON file — with an embedded summary prompt — that you can paste into any AI.

It never sends anything, never reacts, never marks messages as read, and never uploads or stores anything outside your machine. A separate owner-only control bot lets you drive it from a private chat.

tg-digest command guide
The command guide: channels, runs, schedules, prompts, files and health.

Why a user bot

The Bot API can only see channels a bot has been added to, and it cannot read history. To read your own subscriptions, the digest has to run as you — which is what Telethon's MTProto user client does. Because it is your real account, the code is deliberately conservative about joining and rate limits.

The control bot

The scraper and the control bot are two parts of one tool. The bot is the remote control: you send it a command, it runs the scraper as a separate process and reports back in the chat.

CommandWhat it does
/loginQR login — scan from a second device, no code through the chat
/statusLogged in? Shows your first name and only the last 2 digits of your phone
/channelsLists your channels, with paused and invalid marks
/runRuns a digest for the selected window
/scheduleSchedules recurring digests
/logoutConfirms, then logs out on Telegram's side and deletes the local session
tg-digest command reference
Every command is owner-only and works in a private chat. Anyone else gets no reply at all.

How a run works

  1. You pick channels and a window from the bot chat.
  2. The scraper reads only those channels, for that window, and never writes to Telegram.
  3. Messages are formatted into a single digest JSON with a summary prompt embedded.
  4. You paste that file into ChatGPT, Claude or Gemini for a summary.

Outputs are searchable from the bot, and there is a full command guide published as a static site.

Security

Login is normally done by QR from the bot chat, so your OTP and 2FA never have to be typed in a terminal. Where they do, the terminal path is the safest option and is documented as such.

  • Owner-only: only your numeric user id is served; every other message is silently ignored.
  • Secrets stay local: .env, *.session, output/ and .cache/ are all gitignored.
  • Honest about limits: the bot chat is not end-to-end encrypted, and the docs say so plainly.

Try it

It is a personal, local tool with 530 passing tests and a published command guide. Clone it, add your API credentials, and start the control bot.

Read the command guide ↗ GitHub Repository ↗