Skip to content

Monsets/telegram_bot_template

Repository files navigation

TELEGRAM BOT SUBSCRIPTION TEMPLATE

Python Aiogram Payment Integration

A production-ready Telegram bot template built with Python and the Aiogram framework, featuring subscription management, payment processing, user profiles, and referral system. Perfect for creating premium Telegram bots with paid features. 🚀


KEY FEATURES

Subscription Management System

  • 📅 Multiple subscription plans (monthly, quarterly, yearly)
  • 💳 Automated payment processing
  • ✅ Subscription status tracking

User Management

  • 👤 User registration and profiles
  • 📊 Activity tracking
  • 🤝 Referral system with tracking

Payment Integration

  • 🔒 Secure payment processing
  • 💸 Telegram stars payment
  • 🧾 Transaction logging
  • 🔍 Payment verification
  • 🤖 Automatic subscription activation

Admin Tools

  • 🗄️ Database management interface
  • 📝 System logs viewer

Special Features

  • 📰 TG Channel reader (telethon based)
  • 🧠 OpenAI integration for AI features
  • 🔗 Referral program with unique invite links

Referral System

  • 🔗 Unique referral links for each user
  • 🎁 Reward system for successful referrals

AI Integration

  • 🤖 OpenAI API integration
  • 💡 AI-powered features and responses

TECHNICAL SPECIFICATIONS

  • Framework: Aiogram 3.x 🛠️
  • Database: SQLite (easily upgradable to PostgreSQL) 🗃️
  • Python Version: 3.9+ 🐍
  • Architecture: Modular, event-driven 🏗️
  • Deployment: Docker-ready 🐳
  • AI Integration: OpenAI API 🧠

INSTALLATION

  1. Clone the repository:

    git clone https://github.com/Monsets/telegram_bot_template
  2. Install requirements:

    bash setup.sh
  3. Configure environment variables:

    • BOT_TOKEN
    • OPENAI_API_KEY
    • TELETHON_API_ID
    • TELETHON_API_HASH
  4. Run the bot:

    python main.py

CONFIGURATION

  1. Set up your bot token from @BotFather. 🤖
  2. Configure OpenAI API key. 🧠
  3. Adjust subscription plans and prices. 📅
  4. Customize messages and notifications. ✉️
  5. Set up logging preferences. 📝
  6. Set up your API ID and API hash for the channel reader. 📰
  7. Configure referral rewards and levels. 🎁

USE CASES

  • 📦 Premium content distribution
  • 🤖 Paid services automation
  • 👥 Subscription-based communities
  • 📚 Educational platforms
  • 💰 Content monetization
  • 📰 Channel summarization, posts fetching and more
  • 🎯 Affiliate marketing and referral programs
  • 🧠 AI-powered chat and content generation

CONTRIBUTING

We welcome contributions! 🎉 Please read our contributing guidelines before submitting pull requests.


LICENSE

This project is licensed under the MIT License. 📝 Feel free to use it for personal and commercial projects.


KEYWORDS

telegram bot, python bot, aiogram, subscription system, payment processing, bot template, telegram payments, premium bot, subscription management, user management, bot development, telegram api, python automation, bot framework, telegram bot template, telegram bot subscription, telegram channel reader, telegram channel posts, telegram channel posts fetching, telegram channel posts summarization

About

Telegram Bot template with subscription, tg channels reading embedded

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published