π 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_STRING
using @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_STRING
publicly - π Use
.env
for 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