Skip to content

Codeyry/Auto-Request-Accept-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Auto-Request-Accept-Bot

Python Version License Telegram Bot

A powerful Telegram bot that automatically accepts join requests for private channels and groups with advanced management features.

Features β€’ Installation β€’ Configuration β€’ Usage β€’ Deployment


πŸ“‹ Overview

Auto-Request-Accept-Bot is a Telegram bot designed to streamline channel management by automatically accepting join requests for your private channels and groups. It provides a comprehensive admin dashboard with broadcast capabilities, user management, and detailed logging.

The bot works seamlessly with both private channels and public groups, offering 24/7 automatic request handling while giving you full control through an intuitive interface.


✨ Features

Core Features

  • πŸ€– Automatic Join Request Acceptance - Instantly approve all join requests for your channels
  • πŸ‘₯ Multi-Channel Support - Works with unlimited private and public channels
  • πŸ“Š User Database - MongoDB integration to track all users who join your channels
  • πŸ” 24/7 Monitoring - Continuous operation without manual intervention

Advanced Management

  • πŸ“’ Broadcast System - Send messages to all users with one click
    • Visual confirmation before broadcasting
    • Automatic deletion of broadcast messages after set time
  • πŸ‘€ User Management - View detailed user information and send individual messages
  • πŸ“‹ Activity Logging - Comprehensive logs of all bot activities
  • 🎯 Permission Management - Control chat permissions for new members

Commands

start - to start this bot | add to group 
report - /report <Message>
login - login with telegram account
logout - logout and clear session from db 
accept_on - automatic request accept user 
accept_off - automatic user request accept off
accept - to accept pending request of a chat 
users - to see users list [OWNER]
sendmessage - /sendmessage <User ID> <Message> [OWNER]
broadcast - to send broadcast to all users [owner]

πŸš€ Quick Start

Prerequisites

Installation

  1. Clone the Repository
git clone https://github.com/OnlyNoco/Auto-Request-Accept-Bot.git
cd Auto-Request-Accept-Bot
  1. Install Dependencies
pip install -r requirements.txt
  1. Configure the Bot
cp sample_config.py config.py
# Edit config.py with your credentials
  1. Run the Bot
python main.py

βš™οΈ Configuration

Environment Variables

Create a config.py file based on sample_config.py with the following variables:

Variable Type Description
BOT_TOKEN string Your Telegram bot token from BotFather
API_ID integer Telegram API ID from my.telegram.org
API_HASH string Telegram API Hash from my.telegram.org
OWNER_ID integer Your Telegram user ID (admin)
DB_URL string MongoDB connection URL
DB_NAME string MongoDB database name
PORT integer Port for the web server (default: 8080)
WORKER integer Number of worker threads (default: 4)
FLOOD_WAIT integer Delay between messages in seconds (default: 10)
BROADCAST_DELETE_TIME integer Auto-delete broadcast after X seconds (default: 1800)

Customizable Messages

  • START_MSG - Welcome message when users interact with the bot
  • ABOUT_MSG - Bot information and credits
  • CMD_MSG - Help message listing available commands
  • START_PIC - Media URLs for displaying in the start message

Example Configuration

BOT_TOKEN = "your_bot_token_here"
API_ID = 26254064
API_HASH = "your_api_hash_here"
OWNER_ID = 5296584067
DB_URL = "mongodb+srv://username:password@cluster.mongodb.net"
DB_NAME = "JOINREQ"
PORT = 8080
WORKER = 4

πŸ“– Usage

For Bot Administrators

  1. Add Bot to Channel

    • Open your private channel
    • Add the bot as an administrator
    • Grant required permissions (accept join requests)
  2. Monitor Requests

    • Bot automatically accepts all join requests
    • Owner receives notifications for each new member
  3. Send Broadcasts

    • Send any message to the bot in private chat
    • Click the confirmation button to broadcast to all users
    • Message auto-deletes after configured time
  4. Manage Users

    • View all users in the database
    • Send individual messages to specific users
    • Track user activity

For Regular Users

  • Use /start to check bot status
  • Use /help for command information
  • Use /report to contact administrators

πŸ“ Project Structure

Auto-Request-Accept-Bot/
β”œβ”€β”€ main.py                 # Entry point
β”œβ”€β”€ bot.py                  # Bot class and core configuration
β”œβ”€β”€ config.py              # Configuration (create from sample_config.py)
β”œβ”€β”€ sample_config.py       # Configuration template
β”œβ”€β”€ requirements.txt       # Python dependencies
β”œβ”€β”€ Dockerfile             # Docker configuration
β”œβ”€β”€ Procfile              # Deployment configuration
β”œβ”€β”€ LICENSE               # MIT License
β”œβ”€β”€ README.md             # This file
β”‚
β”œβ”€β”€ database/
β”‚   └── database.py       # MongoDB operations
β”‚
└── plugins/
    β”œβ”€β”€ __init__.py
    β”œβ”€β”€ auto_accept.py    # Auto-accept join requests
    β”œβ”€β”€ broadcast.py      # Broadcast functionality
    β”œβ”€β”€ users.py          # User management
    β”œβ”€β”€ report.py         # Report handling
    β”œβ”€β”€ route.py          # Web routing
    β”œβ”€β”€ start.py          # Start command handler


πŸ”§ Technology Stack


🌐 Deployment

Docker Deployment

docker build -t auto-request-bot .
docker run -e BOT_TOKEN="your_token" -e API_ID="your_id" ... auto-request-bot

Heroku Deployment

Deploy to Heroku

  1. Create a Procfile (already included)
  2. Set environment variables on Heroku
  3. Deploy using Heroku CLI:
heroku create your-app-name
heroku config:set BOT_TOKEN="your_token" API_ID="your_id" ...
git push heroku main

Render Deployment

Deploy to Render

  1. Push your code to GitHub
  2. Click the deploy button above
  3. Set environment variables:
    • BOT_TOKEN
    • API_ID
    • API_HASH
    • OWNER_ID
    • DB_URL
    • DB_NAME
  4. Click "Deploy"

Koyeb Deployment

Deploy to Koyeb

  1. Click the deploy button above
  2. Connect your GitHub account
  3. Configure environment variables:
    • BOT_TOKEN - Your Telegram bot token
    • API_ID - Telegram API ID
    • API_HASH - Telegram API Hash
    • OWNER_ID - Your Telegram user ID
    • DB_URL - MongoDB connection string
    • DB_NAME - Database name
  4. Click "Deploy" and wait for deployment to complete

πŸ“‹ Requirements

See requirements.txt for full list of dependencies:

  • pyrofork
  • aiohttp
  • pymongo
  • dnspython
  • TgCrypto-pyrofork
  • pyromod

πŸ› Troubleshooting

Bot Not Responding

  • Verify BOT_TOKEN is correct
  • Check internet connection
  • Ensure bot is running: python main.py

Join Requests Not Accepted

  • Confirm bot has admin permissions in channel
  • Verify "accept join request" permission is enabled
  • Check logs for error messages

Database Connection Issues

  • Verify DB_URL is correct
  • Check MongoDB cluster IP whitelist
  • Ensure network connectivity

Flood Wait Errors

  • Increase FLOOD_WAIT value in config
  • Reduce broadcast message frequency
  • Optimize database queries

🀝 Contributing

Contributions are welcome! Feel free to:

  • Report bugs via /report command
  • Suggest new features
  • Submit pull requests
  • Improve documentation

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘¨β€πŸ’» Author

OnlyNoco


πŸ“’ Other Stuff


πŸ—£οΈ Support

For issues, questions, or suggestions:

  • Use the /report command in the bot
  • Contact @OnlyNoco on Telegram
  • Open an issue on GitHub

⬆ Back to Top

Made with ❀️ by OnlyNoco


πŸ”„ Upcoming Features

SUGGEST ME!

About

This bot can accept join requests in channels automatically.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages