Skip to content

TheSmartDevs/SmartUtilBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ SmartUtilBot - The Ultimate Telegram Toolkit

SmartUtilBot Logo

Version Python MongoDB

Stars Forks Watchers

πŸ”§ The all-in-one Telegram toolkit for seamless education, AI, downloads, and more! ⚑



🌟 Click to Expand - Key Features

✨ Premium Features Overview:

🎯 All In One Telegram Bot With 3 Mixed Libraries
Complete toolkit built with Aiogram, Pyrofork & Telethon
πŸ”₯ Built With Best & Custom Apis & Functions
Powered by A360API and custom-built functions
πŸ”Œ Best Easy Plug And Play
Minimal configuration, maximum functionality
⚑ High Performance And Best Optimized
Built for speed and efficiency
πŸš€ Fully Asyncio & Nonblock I/O Operation Handle
Advanced asynchronous operations
⚑ Works Blazy Fast Like Thunder Rest Depends On Host
Lightning-fast performance
🎨 Best Ui Ux Themed
Beautiful and intuitive interface
πŸ‘‘ Best Admin Utilities
Comprehensive administrative tools
πŸ› οΈ Superb Customizeable
Highly configurable to your needs
πŸ“¦ Built With Custom Python Libraries
SmartFaker and SmartBinDb integration

πŸ› οΈ Technical Stack & Architecture

Core Technologies

Component Technology Badge Purpose
Language Python 🐍 Python Core Development
Bot Libraries Aiogram Aiogram Modern Bot Framework
Pyrofork Pyrofork Telegram MTProto API
Telethon Telethon Telegram Client Library
Database MongoDB πŸ—„οΈ MongoDB NoSQL Database
API Engine A360API A360API Custom API Backend

Custom Architecture Components

🎯 Core Custom Features

πŸ“‹ SmartButtons      # Custom button builder with dataclass
πŸ›‘οΈ SmartSecurity     # Advanced security layer  
πŸ”° SmartDefender     # Comprehensive defense system
πŸ›‘οΈ SmartShield       # 3 decorator wrapper protection
πŸ‘₯ SmartUsers        # User database handler

πŸ“¦ Custom Modules & Wrappers

πŸ—‘οΈ Custom Message Deletion Wrapper    # Efficient message management
⚑ New Task Decorator                 # Asynchronous task handling  
πŸ“ Custom Logger Module               # Comprehensive logging
πŸ“Š Custom Progress Bar Module         # Real-time progress tracking
⚠️ Custom Admin Error Notify          # Instant error reporting

🌐 Custom Libraries Integration

πŸ“¦ PyPI Published Libraries

SmartFaker Version
SmartFaker
pypi.org/project/smartfaker
Advanced fake data generation library
SmartBinDb Version
SmartBinDb
pypi.org/project/smartbindb
Intelligent binary database handling

πŸ”— Related Project - A360API

Repository: github.com/abirxdhack/A360API

  • πŸ› οΈ Built with Python FastAPI
  • ⚑ Pyrofork integration
  • πŸ“‘ Telethon support
  • πŸš€ High-performance API backend for SmartUtilBot

πŸ“‹ Environment Configuration

πŸ”‘ Mandatory Variables

Variable Description Required
API_ID Telegram API ID from my.telegram.org βœ… Yes
API_HASH Telegram API Hash from my.telegram.org βœ… Yes
BOT_TOKEN Bot Token from @BotFather βœ… Yes
DEVELOPER_USER_ID Your Telegram User ID βœ… Yes
MONGO_URL MongoDB Connection URL βœ… Yes
DATABASE_URL Database URL βœ… Yes
A360APIBASEURL A360 API Base URL βœ… Yes

βš™οΈ Optional Variables

πŸ€– AI & Machine Learning APIs
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
REPLICATE_API_TOKEN=YOUR_REPLICATE_API_TOKEN  
GOOGLE_API_KEY=YOUR_GOOGLE_API_KEY
GROQ_API_KEY=YOUR_GROQ_API_KEY
GROQ_API_URL=https://api.groq.com/openai/v1/chat/completions
MODEL_NAME=gemini-2.0-flash
TEXT_MODEL=deepseek-r1-distill-llama-70b
πŸ” Session & Security
SESSION_STRING=YOUR_SESSION_STRING
πŸ› οΈ Utility APIs
TRANS_API_KEY=YOUR_TRANS_API_KEY
OCR_API_KEY=YOUR_OCR_API_KEY  
DOMAIN_API_KEY=YOUR_DOMAIN_API_KEY
DOMAIN_API_URL=https://www.whoisxmlapi.com/whoisserver/WhoisService
IPINFO_API_TOKEN=YOUR_IPINFO_API_TOKEN
WEB_SS_KEY=YOUR_WEB_SS_KEY
IMAGE_UPLOAD_KEY=YOUR_IMAGE_UPLOAD_KEY
⚑ Rate Limits & Performance
CC_SCRAPPER_LIMIT=5000
SUDO_CCSCR_LIMIT=10000
MULTI_CCSCR_LIMIT=2000
MAIL_SCR_LIMIT=10000
SUDO_MAILSCR_LIMIT=15000
CC_GEN_LIMIT=2000
MULTI_CCGEN_LIMIT=5000
DOMAIN_CHK_LIMIT=20
PROXY_CHECK_LIMIT=20
πŸ“± Media & Content Configuration
MAX_TXT_SIZE=15728640               # 15MB
MAX_VIDEO_SIZE=2147483648           # 2GB
IMGAI_SIZE_LIMIT=5242880           # 5MB
VIDEO_RESOLUTION=1280x720
YT_COOKIES_PATH=bot/SmartCookies/SmartUtilBot.txt
πŸ“’ Channel & System Configuration
UPDATE_CHANNEL_URL=t.me/TheSmartDev
LOG_CHANNEL_ID=-1002735511721
COMMAND_PREFIX=!|.|#|,|/

πŸš€ Deployment Methods

πŸ–₯️ VPS Deployment

Quick Setup

# πŸ“‚ Clone Repository
git clone https://github.com/TheSmartDevs/SmartUtilBot
cd SmartUtilBot

# πŸ“¦ Install Dependencies  
pip3 install -r requirements.txt

# 🎬 Install FFmpeg (Required for media processing)
sudo apt update
sudo apt install ffmpeg
# ⚠️ Note: FFmpeg cannot be installed via pip

# πŸš€ Run the Bot
python3 -m bot

Background Deployment with Screen

# πŸ“Ί Install Screen
apt install screen

# πŸ–₯️ Create Screen Session
screen -S SmartUtilBot

# πŸš€ Run in Background
python3 -m bot

# πŸ”„ Detach: Ctrl+A then D
# πŸ”Œ Reattach: screen -r SmartUtilBot

🐳 Docker Deployment

# πŸš€ Deploy with Docker Compose
docker compose up --build --remove-orphans

# ⏹️ Stop the Bot
docker compose down

🌐 Heroku Deployment

Deploy to Heroku

Click the deploy button above for one-click Heroku deployment


πŸ”§ Session String Generation

🌟 Handling Scrapper Utils Errors with SESSION_STRING πŸ’«

⚠️ Important: Avoid common user client errors by generating a fresh SESSION_STRING using @ISmartToolBot 🌐

✨ Quick Steps to Generate SESSION_STRING

Step Action Details
1️⃣ Visit Bot πŸš€ Go to @ISmartToolBot
2️⃣ Start Generation πŸ’¬ Send /pyro to start pyrofork session generation
3️⃣ API ID πŸ†” Enter your API ID from my.telegram.org
4️⃣ API Hash πŸ” Enter your API HASH
5️⃣ Phone Number πŸ“ž Input your phone number in international format (e.g., +880...) πŸ‡§πŸ‡©
6️⃣ OTP Code βœ… Send the OTP you receive (e.g., AB2 BC4 CD5 EF6 GH6) β€” the bot auto-extracts it as 24566
7️⃣ Get Session πŸ’Ύ Check Saved Messages for your SESSION_STRING
8️⃣ Configure πŸ› οΈ Add it to your .env or config.py

❄️ Important Notice: Avoid Frequent Restarts ⚠️

Frequent restarts using user accounts can trigger Telegram's security system πŸ‘€

πŸ’₯ You Might Face:

β€’ 🚫 Forced logout of your account
β€’ ❌ 406 AUTH_KEY_DUPLICATED error
β€’ ⚠️ Temporary bans or session invalidation

⭐️ To Stay Safe:

β€’ Minimize restarts
β€’ Always use a fresh session if errors appear
β€’ Prefer bot accounts for heavy tasks

βœ… Pro Tips

  • πŸ”„ Fresh sessions fix 90% of scraper issues
  • πŸ” Never share your SESSION_STRING publicly
  • πŸ“ Use .env for secure config management

πŸͺ YouTube Download Configuration

Handling YouTube Download Errors with Cookies πŸͺ

To avoid errors related to YouTube sign-in requirements or bot protection, using a cookie file is highly recommended.

Steps to Export and Use Cookies πŸ‘€

Step Action Description
1️⃣ Create Chrome Profile πŸ–₯️ Create a new Chrome profile to manage cookies securely
2️⃣ Install Extension πŸ”§ Use Cookie Editor extension
3️⃣ Export from YouTube πŸ“Ί Login to YouTube β†’ Export cookies in Netscape format πŸ“„
4️⃣ Save Cookie File πŸ“‚ Save as SmartUtilBot.txt in SmartUtilBot/cookies/SmartUtilBot.txt

Managing Cookies πŸ’‘

πŸ”„ Cookie Expiry

β€’ YouTube cookies may expire or become invalid
β€’ If download issues occur, export fresh cookies πŸ”„
β€’ Don't play videos on mobile/PC with cookie account
β€’ Don't sign out from Gmail/browser used for export
β€’ Don't restart bot frequently to prevent COOKIE EXPIRY

πŸ›‘οΈ Cookie Depletion

β€’ Avoid frequent bot restarts ⚠️
β€’ Prevent excessive YouTube requests
β€’ Monitor bot activity πŸ‘€
β€’ Keep cookies valid longer

πŸš€ This setup ensures reliable access to YouTube content without encountering sign-in or bot protection errors.


πŸ”” Ethical Notice

βš–οΈ Ethics Reminder: Simply modifying a few lines of code does not constitute original authorship. When forking a project, always fork responsibly and give proper credit to the original creators.


πŸ‘₯ Project Contributors

πŸ§‘β€πŸ’» Main Author



🌟 Abir Arafat Chawdhury
The Main Author & Base Developer of SmartToolBot




🌟 Star History

Star History Chart

πŸ’– Support the Project

⭐ Star the repository 🍴 Fork and contribute
πŸ“’ Share with community πŸ’¬ Join our Telegram Channel

Footer

πŸ“œ License: MIT License
πŸ”— Repository: github.com/TheSmartDevs/SmartUtilBot

Made with ❀️ by Abir Arafat Chawdhury

Footer Text

About

Smart Util is the most complete bot designed to assist you with a wide array of tools. By @abirxdhack & @TheSmartDevs.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages