A Telegram bot that helps you track, save, and view deleted and edited messages in Telegram Business chats.
Built with Node.js + TypeScript + Prisma + grammY + Express (Webhook).
Telegram does not natively allow recovering deleted or edited messages. Ghost Catch Bot solves this by safely storing message history from Telegram Business chats before it disappears.
This project is currently under development and not production-ready. Expect possible bugs, breaking changes, and missing features. Use it at your own risk. If you encounter any issues, feel free to report them in the Issues section or contribute improvements via a Pull Request.
- 🗑️ View Deleted Messages: Never miss what was sent, even if the sender deletes it.
- 📝 Track Edits: View edited messages side-by-side with their original content.
- 🔒 Protect Media: Save ephemeral or protected media before it expires.
- 📊 Analytics: View user and chat message statistics.
- 🔌 Seamless Integration: Quick and easy connection to your Telegram Business account.
The bot connects to your Telegram Business account via Webhooks and listens for:
- Incoming messages
- Message edits
- Message deletions
- Protected/ephemeral media events
⚠️ Note: To ensure user privacy, all captured data is encrypted at rest and automatically wiped using strict expiration rules.
- All messages are encrypted before storage
- Data has automatic expiration rules
- No data is shared with third parties
- Runtime: Node.js / Bun
- Language: TypeScript
- Bot Framework: grammY (Telegram Bot API)
- Database & ORM: PostgreSQL + Prisma ORM
- Server: Express (for Webhook handling)
- Utilities:
node-cron(cleanup jobs),crypto-js(encryption),dotenv
- Clone the repository
git clone https://github.com/kyst14/ghostcatchbot
cd ghostcatchbot- Install dependencies
npm installor
bun install- Clone environment
cp .env.example .env- Running the bot
Development
npm run devor
bun devProduction
npm run build
npm startor
bun run build
bun start- Open Telegram settings
- Go to Edit Profile → Chat automation
- Add your bot
- /start — Start the bot
- /help — Show help message
- /connect — Help to connect bot
- /stats — Show message statistics
- /feedback — Send feedback to developer
- /about — Project information and links
- GitHub: https://github.com/kyst14
- Telegram: https://t.me/Cat333t
This project is licensed under GNU GPLv3.