Skip to content

UTK253/PERSONAL_SRCB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– Personal Save Restricted Content Bot

A powerful Telegram bot that saves and forwards restricted content from channels and groups with advanced login features


โœจ Features

  • ๐Ÿ“‹ Save restricted content from any Telegram channel/group
  • ๐Ÿ” Secure login system with string session management
  • ๐Ÿ”— Multiple link formats support (public, private, bot links)
  • ๐Ÿ“ฆ Bulk message forwarding with range support
  • ๐ŸŽฏ Easy to use with simple commands
  • ๐Ÿ”ง User-friendly interface with intuitive commands

๐Ÿš€ Quick Start

1. Get Your Credentials

Variable Description Get From
API_ID Your Telegram API ID my.telegram.org
API_HASH Your Telegram API Hash my.telegram.org
BOT_TOKEN Your Bot Token @BotFather
ADMINS Admin User IDs (comma-separated) Your Telegram User ID
DB_URI MongoDB Database URL MongoDB Atlas
ERROR_MESSAGE Show error messages (True/False) Set to True or False

2. Get MongoDB Database

  1. Go to MongoDB Atlas
  2. Create a free account
  3. Create a new cluster
  4. Get your connection string (replace <password> with your actual password)

๐ŸŽฎ Bot Commands

Command Description
/start Start the bot and check if it's working
/help Get detailed usage instructions
/login Login with your Telegram string session
/logout Logout from your current session
/cancel Cancel any ongoing operation

๐Ÿ“– How to Use

๐Ÿ“ข For Public Channels/Groups

Simply send the post link:

https://t.me/channelname/123

๐Ÿ”’ For Private Channels/Groups

  1. First send the invite link (if not already a member):
https://t.me/+AbCdEfGhIjKlMnOp
  1. Then send the post link:
https://t.me/c/1234567890/123

๐Ÿค– For Bot Messages

Send the link in this format:

https://t.me/b/botusername/123

๐Ÿ“ฆ For Multiple Messages

Send links with range format:

https://t.me/channelname/100-110
https://t.me/c/1234567890/50 - 60

๐ŸŒ Deployment Options

๐ŸŸข Method 1: Scalingo

  1. Fork this repository
  2. Create account on Scalingo
  3. Create new app
  4. Connect your GitHub repository
  5. Add environment variables in Settings
  6. Deploy!

๐Ÿ”ต Method 2: Back4App

  1. Fork this repository
  2. Create account on Back4App
  3. Create new app
  4. Connect GitHub repository
  5. Set environment variables
  6. Deploy container

๐ŸŸ  Method 3: Koyeb

  1. Fork this repository
  2. Create account on Koyeb
  3. Create new app from GitHub
  4. Select your repository
  5. Add environment variables in Settings
  6. Deploy with auto-scaling

๐ŸŸค Method 4: PythonAnywhere

  1. Fork this repository
  2. Create account on PythonAnywhere
  3. Open Bash console
  4. Clone your repository: git clone https://github.com/UTK253/PERSONAL_SRCB
  5. Install requirements: pip3.10 install --user -r requirements.txt
  6. Set environment variables in Files tab
  7. Create a task to run python3.10 bot.py

๐ŸŸฃ Method 5: VPS/Server

# Clone repository
git clone https://github.com/UTK253/PERSONAL_SRCB
cd PERSONAL_SRCB

# Install dependencies
pip3 install -r requirements.txt

# Set environment variables
export API_ID="your_api_id"
export API_HASH="your_api_hash"
export BOT_TOKEN="your_bot_token"
export ADMINS="your_admin_id"
export DB_URI="your_mongodb_uri"
export ERROR_MESSAGE="True"

# Run the bot
python3 bot.py

๐ŸŸก Method 6: Google Colab

  1. Open Google Colab
  2. Create new notebook
  3. Run this code:
!git clone https://github.com/UTK253/PERSONAL_SRCB
%cd PERSONAL_SRCB
!pip install -r requirements.txt

# Set your variables
import os
os.environ['API_ID'] = 'your_api_id'
os.environ['API_HASH'] = 'your_api_hash'
os.environ['BOT_TOKEN'] = 'your_bot_token'
os.environ['ADMINS'] = 'your_admin_id'
os.environ['DB_URI'] = 'your_mongodb_uri'
os.environ['ERROR_MESSAGE'] = 'True'

!python bot.py

๐Ÿณ Method 7: Docker

# Build image
docker build -t personal-save-bot .

# Run container
docker run -e API_ID="your_api_id" \
           -e API_HASH="your_api_hash" \
           -e BOT_TOKEN="your_bot_token" \
           -e ADMINS="your_admin_id" \
           -e DB_URI="your_mongodb_uri" \
           -e ERROR_MESSAGE="True" \
           personal-save-bot

๐Ÿ”ง Method 8: Non-Docker Local

# Install Python 3.10+
# Clone repository
git clone https://github.com/UTK253/PERSONAL_SRCB
cd PERSONAL_SRCB

# Create virtual environment
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Create .env file with your variables
echo "API_ID=your_api_id" > .env
echo "API_HASH=your_api_hash" >> .env
echo "BOT_TOKEN=your_bot_token" >> .env
echo "ADMINS=your_admin_id" >> .env
echo "DB_URI=your_mongodb_uri" >> .env
echo "ERROR_MESSAGE=True" >> .env

# Run the bot
python bot.py

โš ๏ธ Important Notes

  • Never share your API credentials with anyone
  • Use environment variables for sensitive data, don't hardcode them
  • Keep your bot token secure and regenerate if compromised
  • MongoDB URI should be kept private and secure
  • Test with small message ranges before bulk forwarding

๐Ÿ› ๏ธ Troubleshooting

Common Issues:

  • Bot not responding: Check if bot token is correct
  • Login issues: Verify API_ID and API_HASH
  • Database errors: Ensure MongoDB URI is correct and accessible
  • Permission errors: Make sure the account has access to the source chat

Getting Help:

  1. Check the bot's /help command
  2. Verify all environment variables are set correctly
  3. Check bot logs for error messages
  4. Ensure your account is not restricted

๐Ÿ† Credits


๐Ÿ“„ License

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


๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

โญ Support

If this project helped you, please give it a โญ star!

Need help? Contact @B3ASTX_BOTS


Made with โค๏ธ by BEAST X BOTS

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages