π§ The all-in-one Telegram toolkit for seamless education, AI, downloads, and more! β‘
π Click to Expand - Key Features
Complete toolkit built with Aiogram, Pyrofork & Telethon
Powered by A360API and custom-built functions
Minimal configuration, maximum functionality
Built for speed and efficiency
Advanced asynchronous operations
Lightning-fast performance
Beautiful and intuitive interface
Comprehensive administrative tools
Highly configurable to your needs
SmartFaker and SmartBinDb integration
π οΈ Technical Stack & Architecture
| 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 |
π 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 Version
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
Click the deploy button above for one-click Heroku deployment
π§ 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 π
- π 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 |
β’ 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.
π License: MIT License
π Repository: github.com/TheSmartDevs/SmartUtilBot
Made with β€οΈ by Abir Arafat Chawdhury
Footer Text