🌟 Click to Expand - Key Features
| 🎯 | 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
📋 SmartButtons # Custom button builder with dataclass
🛡️ SmartSecurity # Advanced security layer
🔰 SmartDefender # Comprehensive defense system
🛡️ SmartShield # 3 decorator wrapper protection
👥 SmartUsers # User database handler🗑️ 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
|
SmartFaker pypi.org/project/smartfaker Advanced fake data generation library |
SmartBinDb pypi.org/project/smartbindb Intelligent binary database handling |
Repository: github.com/abirxdhack/A360API
- 🛠️ Built with Python FastAPI
- ⚡ Pyrofork integration
- 📡 Telethon support
- 🚀 High-performance API backend for SmartUtilBot
📋 Environment Configuration
| 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 |
🤖 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
# 📂 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# 📺 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# 🚀 Deploy with Docker Compose
docker compose up --build --remove-orphans
# ⏹️ Stop the Bot
docker compose down🔧 Session String Generation
⚠️ Important: Avoid common user client errors by generating a freshSESSION_STRINGusing @ISmartToolBot 🌐
| 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 |
Frequent restarts using user accounts can trigger Telegram's security system 👀
|
• 🚫 Forced logout of your account • ❌ 406 AUTH_KEY_DUPLICATED error• |
• Minimize restarts • Always use a fresh session if errors appear • Prefer bot accounts for heavy tasks |
- 🔄 Fresh sessions fix 90% of scraper issues
- 🔐 Never share your
SESSION_STRINGpublicly - 📁 Use
.envfor secure config management
🍪 YouTube Download Configuration
To avoid errors related to YouTube sign-in requirements or bot protection, using a cookie file is highly recommended.
| 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 |
|
• 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 |
• 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.
⚖️ 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.
|
🌟 Abir Arafat Chawdhury The Main Author & Base Developer of SmartToolBot |
| ⭐ | Star the repository | 🍴 | Fork and contribute |
| 📢 | Share with community | 💬 | Join our Telegram Channel |
📜 License: MIT License
🔗 Repository: github.com/TheSmartDevs/SmartUtilBot
Made with ❤️ by Abir Arafat Chawdhury