Skip to content

diractory/donationbot

Repository files navigation

Typing SVG

Python Flask MongoDB Render Telegram


❤️ About

A Flask + MongoDB Telegram bot that collects one-time-meal donations for children and stray dogs — with QR-code payments, UTR + screenshot verification, an admin approval channel, and built-in admin tools.

Tap Donate, choose who you're feeding, pay via QR, and the team verifies + approves your donation right from Telegram. Simple, transparent, and fast. 🍛🐾


✨ Features

  • 👋 Personalized /start greeting
  • 🧒🐕 Choose Children (₹30) / Dogs (₹20) / Both (₹50) — donate more to feed extra
  • 📝 Optional note, name-on-record, optional Instagram shout-out, email for proof
  • ⏳ QR code that auto-expires in 5 minutes
  • 🧾 UTR ID + payment screenshot verification
  • 🔒 Donor details posted to the admin channel hidden behind a spoiler
  • ✅❌ One-tap Approve / Decline for admins, with automatic donor notifications
  • 📜 /history — donors can view their own donation history
  • 📊 /stats and 📢 /broadcast — admin-only tools

🚀 Quick Start

  1. Set your environment variables (BOT_TOKEN, MONGO_URL, CHANNEL_ID, ADMIN_IDS, QR_IMAGE_URL, BASE_URL, WEBHOOK_SECRET) — see .env.example
  2. Deploy to Render (Procfile + render.yaml included)
  3. Visit /set_webhook once, in your browser
  4. Send /start to your bot 🎉

📂 Project Structure

app.py           Flask app + webhook endpoint
handlers.py      All conversation logic (the "brain")
db.py            MongoDB access layer
telegram_api.py  Thin wrapper around Telegram Bot API calls
keyboards.py     Inline keyboard builders
scheduler.py     Background timer to auto-delete the QR after 5 minutes
config.py        Reads all settings from environment variables

┌──────────────────────────────────────────────┐
│                                                │
│   🧑‍💻  Made by Radhey                          │
│                                                │
│   💬  Telegram   : https://t.me/Youradhey      │
│   📢  Channel    : https://t.me/xivasudev      │
│                                                │
└──────────────────────────────────────────────┘

⭐ Support this project

If this bot helped you set up your donation drive, consider giving the repo a star — it genuinely helps and takes two seconds! 🙏

Star this repo


Built with ❤️ for a good cause — every meal counts.

About

No description or website provided.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages