Skip to main content
Bot

DiBot CV FEE

A Telegram bot to convert, merge, and split VCF and TXT contact files, complete with membership and automatic QRIS payment.

Python python-telegram-bot SQLite aiohttp httpx Pakasir (QRIS) Nginx systemd
DEMO

A Telegram bot for a boring but frequent chore: processing large contact lists.

What it can do

  • Convert TXT to VCF and back, and extract numbers from XLSX or CSV.
  • Merge many files with duplicate removal, split large VCFs, bulk-rename contacts, and count contacts.

Membership and payments

VIP plans are paid via QRIS (Pakasir). VIP is activated automatically once the payment webhook arrives, and the webhook is verified through HMAC, order ID, and amount. The bot is used regularly by around 200 paying members.

Behind the scenes

  • Async python-telegram-bot, with custom conversation state built on SQLite.
  • SQLite in WAL mode with a connection pool, and all database calls go through a thread pool so the event loop is never blocked.
  • Sessions are stored on disk so large files don't exhaust memory.
  • Per-user rate limiting, scheduled jobs for expired VIPs and old sessions, a health check endpoint, and a local Bot API server to reduce latency.
  • Runs on a Linux VPS with systemd and Nginx.

What I learned

Several rounds of code audits uncovered real problems: async/sync mismatches, exhausted pool connections, out-of-memory errors when splitting large VCFs, and a membership cache bug. All of them have been fixed.