All work

Entry 01 of 03

Work

Telegram Commands

Let a team ask for job results inside Telegram

  • Python
  • Telegram Bot API
  • SQLite
Read the walkthrough
  1. Ask for the status
  2. Read the export summary
  3. Choose the next action

Overview

I build Telegram command handlers that look up a job, answer in the same chat and offer relevant actions as inline buttons. In the walkthrough, a /status command returns an export summary with options to retrieve the file or run the job again.

What it covers

  • Slash commands
  • Inline buttons
  • Status lookups
  • File delivery

A useful reply

The person asking for an export needs to know whether it finished and where to get the file. Returning both in the same conversation saves a second lookup.

Build a status command

  1. Choose one job your team wants to check and store its latest result and export reference in SQLite.
  2. Connect a Python handler for /status to the Telegram Bot API and have it look up that job and reply in the same chat.
  3. Test a completed job and an unfinished job, offering the download button only when the export is ready for that chat.