├── script.js ├── style.css └── index.html /script.js: -------------------------------------------------------------------------------- 1 | var gk_isXlsx = false; 2 | var gk_xlsxFileLookup = {}; 3 | var gk_fileData = {}; 4 | 5 | function filledCell(cell) { 6 | return cell !== '' && cell != null; 7 | } 8 | 9 | function loadFileData(filename) { 10 | if (gk_isXlsx && gk_xlsxFileLookup[filename]) { 11 | try { 12 | var workbook = XLSX.read(gk_fileData[filename], { type: 'base64' }); 13 | var firstSheetName = workbook.SheetNames[0]; 14 | var worksheet = workbook.Sheets[firstSheetName]; 15 | 16 | // Convert sheet to JSON to filter blank rows 17 | var jsonData = XLSX.utils.sheet_to_json(worksheet, { header: 1, blankrows: false, defval: '' }); 18 | // Filter out blank rows (rows where all cells are empty, null, or undefined) 19 | var filteredData = jsonData.filter(row => row.some(filledCell)); 20 | 21 | // Heuristic to find the header row by ignoring rows with fewer filled cells than the next row 22 | var headerRowIndex = filteredData.findIndex((row, index) => 23 | row.filter(filledCell).length >= filteredData[index + 1]?.filter(filledCell).length 24 | ); 25 | // Fallback 26 | if (headerRowIndex === -1 || headerRowIndex > 25) { 27 | headerRowIndex = 0; 28 | } 29 | 30 | // Convert filtered JSON back to CSV 31 | var csv = XLSX.utils.aoa_to_sheet(filteredData.slice(headerRowIndex)); 32 | csv = XLSX.utils.sheet_to_csv(csv, { header: 1 }); 33 | return csv; 34 | } catch (e) { 35 | console.error(e); 36 | return ""; 37 | } 38 | } 39 | return gk_fileData[filename] || ""; 40 | } 41 | 42 | // Initialize AOS 43 | AOS.init({ 44 | duration: 1000, 45 | once: true 46 | }); 47 | 48 | // Back to Top Button 49 | const backToTop = document.getElementById('back-to-top'); 50 | window.onscroll = function() { 51 | if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) { 52 | backToTop.style.display = 'block'; 53 | } else { 54 | backToTop.style.display = 'none'; 55 | } 56 | }; 57 | 58 | backToTop.addEventListener('click', function() { 59 | window.scrollTo({ top: 0, behavior: 'smooth' }); 60 | }); 61 | 62 | // Navbar Scroll Effect 63 | const navbar = document.querySelector('.navbar'); 64 | window.addEventListener('scroll', () => { 65 | if (window.scrollY > 50) { 66 | navbar.classList.add('scrolled'); 67 | } else { 68 | navbar.classList.remove('scrolled'); 69 | } 70 | }); 71 | 72 | // Theme Toggle 73 | const themeToggle = document.getElementById('theme-toggle'); 74 | const currentTheme = localStorage.getItem('theme') || 'light'; 75 | 76 | // Set initial theme 77 | if (currentTheme === 'dark') { 78 | document.documentElement.setAttribute('data-theme', 'dark'); 79 | themeToggle.querySelector('.fa-moon').style.display = 'inline'; 80 | themeToggle.querySelector('.fa-sun').style.display = 'none'; 81 | } else { 82 | document.documentElement.setAttribute('data-theme', 'light'); 83 | themeToggle.querySelector('.fa-sun').style.display = 'inline'; 84 | themeToggle.querySelector('.fa-moon').style.display = 'none'; 85 | } 86 | 87 | // Toggle theme on click 88 | themeToggle.addEventListener('click', () => { 89 | let theme = document.documentElement.getAttribute('data-theme') === 'dark' ? 'light' : 'dark'; 90 | document.documentElement.setAttribute('data-theme', theme); 91 | localStorage.setItem('theme', theme); 92 | if (theme === 'dark') { 93 | themeToggle.querySelector('.fa-moon').style.display = 'inline'; 94 | themeToggle.querySelector('.fa-sun').style.display = 'none'; 95 | } else { 96 | themeToggle.querySelector('.fa-sun').style.display = 'inline'; 97 | themeToggle.querySelector('.fa-moon').style.display = 'none'; 98 | } 99 | }); -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --primary-bg: #ffffff; 3 | --secondary-bg: #f8f9fa; 4 | --accent-color: #28a745; 5 | --text-color: #333333; 6 | --hover-scale: 1.05; 7 | --shadow-color: rgba(0, 0, 0, 0.2); 8 | } 9 | 10 | [data-theme="dark"] { 11 | --primary-bg: #0a0e17; 12 | --secondary-bg: #1a1f2e; 13 | --accent-color: #00ff88; 14 | --text-color: #d4d4d8; 15 | --shadow-color: rgba(0, 0, 0, 0.7); 16 | } 17 | 18 | body { 19 | background-color: var(--primary-bg); 20 | color: var(--text-color); 21 | font-family: 'Poppins', sans-serif; 22 | scroll-behavior: smooth; 23 | transition: background-color 0.3s, color 0.3s; 24 | } 25 | 26 | .hero { 27 | background: linear-gradient(to right, #e8f5e9, #c8e6c9); 28 | padding: 120px 0; 29 | text-align: center; 30 | border-bottom: 2px solid var(--accent-color); 31 | } 32 | 33 | [data-theme="dark"] .hero { 34 | background: linear-gradient(to right, #1a1f2e, #2a3247); 35 | border-bottom: 2px solid var(--accent-color); 36 | } 37 | 38 | .hero h1 { 39 | font-size: 4rem; 40 | font-weight: 600; 41 | margin-bottom: 20px; 42 | color: var(--text-color); 43 | text-shadow: 2px 2px 4px var(--shadow-color); 44 | } 45 | 46 | .hero p { 47 | font-size: 1.6rem; 48 | color: var(--text-color); 49 | } 50 | 51 | .navbar { 52 | background-color: var(--secondary-bg); 53 | box-shadow: 0 2px 8px var(--shadow-color); 54 | transition: background-color 0.3s; 55 | } 56 | 57 | .navbar.scrolled { 58 | background-color: var(--primary-bg); 59 | } 60 | 61 | .navbar .nav-link { 62 | color: var(--text-color); 63 | font-weight: 400; 64 | transition: color 0.3s, transform 0.3s; 65 | } 66 | 67 | [data-theme="dark"] .navbar .nav-link { 68 | color: var(--text-color); 69 | } 70 | 71 | .navbar .nav-link:hover { 72 | color: var(--accent-color); 73 | transform: translateY(-2px); 74 | } 75 | 76 | section { 77 | padding: 80px 0; 78 | } 79 | 80 | h2 { 81 | color: var(--accent-color); 82 | font-weight: 600; 83 | margin-bottom: 30px; 84 | position: relative; 85 | } 86 | 87 | h2::after { 88 | content: ''; 89 | width: 50px; 90 | height: 3px; 91 | background: var(--accent-color); 92 | position: absolute; 93 | bottom: -10px; 94 | left: 0; 95 | } 96 | 97 | .btn-custom { 98 | background-color: var(--accent-color); 99 | color: #ffffff; 100 | text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); 101 | border: none; 102 | padding: 10px 20px; 103 | border-radius: 25px; 104 | transition: transform 0.2s, box-shadow 0.2s, background-color 0.3s; 105 | } 106 | 107 | .btn-custom:hover { 108 | transform: scale(var(--hover-scale)); 109 | box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4); 110 | background-color: #218838; 111 | } 112 | 113 | [data-theme="dark"] .btn-custom:hover { 114 | box-shadow: 0 5px 15px rgba(0, 255, 136, 0.4); 115 | background-color: #00cc70; 116 | } 117 | 118 | .accordion-button { 119 | background-color: var(--secondary-bg); 120 | color: var(--text-color); 121 | font-weight: 500; 122 | transition: background-color 0.3s, color 0.3s; 123 | } 124 | 125 | [data-theme="dark"] .accordion-button { 126 | background-color: var(--secondary-bg); 127 | color: var(--text-color); 128 | } 129 | 130 | .accordion-button:not(.collapsed) { 131 | background-color: var(--accent-color); 132 | color: #ffffff; 133 | } 134 | 135 | .accordion-body { 136 | background-color: var(--primary-bg); 137 | border: 1px solid #dee2e6; 138 | color: var(--text-color); 139 | } 140 | 141 | [data-theme="dark"] .accordion-body { 142 | border: 1px solid #3a3f4e; 143 | color: var(--text-color); 144 | } 145 | 146 | .feature-item { 147 | padding: 12px; 148 | border-radius: 5px; 149 | transition: background-color 0.3s, transform 0.3s; 150 | color: var(--text-color); 151 | } 152 | 153 | [data-theme="dark"] .feature-item { 154 | color: var(--text-color); 155 | } 156 | 157 | .feature-item:hover { 158 | background-color: #e8f5e9; 159 | transform: translateX(8px); 160 | } 161 | 162 | [data-theme="dark"] .feature-item:hover { 163 | background-color: #2a3247; 164 | } 165 | 166 | pre { 167 | background-color: var(--secondary-bg); 168 | padding: 20px; 169 | border-radius: 8px; 170 | overflow-x: auto; 171 | color: var(--text-color); 172 | font-size: 0.95rem; 173 | } 174 | 175 | code { 176 | font-family: 'Courier New', monospace; 177 | color: var(--text-color); 178 | } 179 | 180 | [data-theme="dark"] code { 181 | color: var(--text-color); 182 | } 183 | 184 | #back-to-top { 185 | position: fixed; 186 | bottom: 30px; 187 | right: 30px; 188 | display: none; 189 | background-color: var(--accent-color); 190 | color: #ffffff; 191 | text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); 192 | border: none; 193 | padding: 12px 18px; 194 | border-radius: 50%; 195 | transition: transform 0.2s, opacity 0.3s; 196 | } 197 | 198 | #back-to-top:hover { 199 | transform: scale(1.1); 200 | opacity: 0.9; 201 | } 202 | 203 | footer { 204 | background-color: var(--secondary-bg); 205 | padding: 30px 0; 206 | text-align: center; 207 | border-top: 1px solid #dee2e6; 208 | } 209 | 210 | [data-theme="dark"] footer { 211 | border-top: 1px solid #3a3f4e; 212 | } 213 | 214 | footer p { 215 | color: var(--text-color); 216 | } 217 | 218 | [data-theme="dark"] footer p { 219 | color: var(--text-color); 220 | } 221 | 222 | .text-accent { 223 | color: var(--accent-color); 224 | transition: color 0.3s; 225 | } 226 | 227 | .text-accent:hover { 228 | color: #1e7e34; 229 | } 230 | 231 | [data-theme="dark"] .text-accent:hover { 232 | color: #00cc70; 233 | } 234 | 235 | .card { 236 | border: none; 237 | border-radius: 10px; 238 | box-shadow: 0 4px 12px var(--shadow-color); 239 | transition: transform 0.3s; 240 | background-color: var(--primary-bg); 241 | color: var(--text-color); 242 | } 243 | 244 | [data-theme="dark"] .card { 245 | background-color: var(--primary-bg); 246 | color: var(--text-color); 247 | } 248 | 249 | .card:hover { 250 | transform: translateY(-5px); 251 | } 252 | 253 | .card ul, .card li, .card p, .card a { 254 | color: var(--text-color); 255 | } 256 | 257 | [data-theme="dark"] .card ul, 258 | [data-theme="dark"] .card li, 259 | [data-theme="dark"] .card p, 260 | [data-theme="dark"] .card a { 261 | color: var(--text-color); 262 | } 263 | 264 | /* Theme Toggle Button */ 265 | .theme-toggle { 266 | background-color: transparent; 267 | border: none; 268 | color: var(--text-color); 269 | font-size: 1.2rem; 270 | padding: 8px; 271 | transition: color 0.3s, transform 0.3s; 272 | display: flex; 273 | align-items: center; 274 | } 275 | 276 | .theme-toggle:hover { 277 | color: var(--accent-color); 278 | transform: scale(1.2); 279 | } 280 | 281 | .theme-toggle i { 282 | transition: transform 0.3s; 283 | } 284 | 285 | .theme-toggle .fa-sun { 286 | display: inline; 287 | } 288 | 289 | .theme-toggle .fa-moon { 290 | display: none; 291 | } 292 | 293 | [data-theme="dark"] .theme-toggle .fa-sun { 294 | display: none; 295 | } 296 | 297 | [data-theme="dark"] .theme-toggle .fa-moon { 298 | display: inline; 299 | } 300 | 301 | /* Social Icons Styling */ 302 | .social-icons { 303 | margin-top: 20px; 304 | } 305 | 306 | .social-icons a { 307 | font-size: 2rem; 308 | margin: 0 15px; 309 | transition: transform 0.3s, opacity 0.3s; 310 | } 311 | 312 | .social-icons a:hover { 313 | transform: scale(1.2); 314 | opacity: 0.8; 315 | } 316 | 317 | .fa-facebook-f { 318 | color: #1877f2; 319 | } 320 | 321 | .fa-github { 322 | color: #181717; 323 | } 324 | 325 | [data-theme="dark"] .fa-github { 326 | color: #d4d4d8; 327 | } 328 | 329 | .fa-telegram { 330 | color: #0088cc; 331 | } 332 | 333 | .fa-instagram { 334 | color: #e4405f; 335 | } 336 | 337 | .fa-twitter { 338 | color: #1da1f2; 339 | } 340 | 341 | /* Ensure all text elements are visible in night mode */ 342 | a, p, li, h3, h4, h5, h6, .blockquote { 343 | color: var(--text-color); 344 | } 345 | 346 | [data-theme="dark"] a, 347 | [data-theme="dark"] p, 348 | [data-theme="dark"] li, 349 | [data-theme="dark"] h3, 350 | [data-theme="dark"] h4, 351 | [data-theme="dark"] h5, 352 | [data-theme="dark"] h6, 353 | [data-theme="dark"] .blockquote { 354 | color: var(--text-color); 355 | } 356 | 357 | @media (max-width: 768px) { 358 | .hero h1 { 359 | font-size: 2.5rem; 360 | } 361 | 362 | .hero p { 363 | font-size: 1.2rem; 364 | } 365 | 366 | section { 367 | padding: 50px 0; 368 | } 369 | 370 | .social-icons a { 371 | font-size: 1.5rem; 372 | margin: 0 10px; 373 | } 374 | 375 | .theme-toggle { 376 | font-size: 1rem; 377 | padding: 6px; 378 | } 379 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 |Smart Util is the most complete bot designed to assist you with a wide array of tools.
27 | Source Code 28 |SmartUtilBot is a powerful Telegram bot built with Python and Pyrogram, designed to provide a wide range of utilities including credit card scraping, media downloading, AI-powered tools, and more. This bot leverages multiple APIs and services to deliver robust functionality for both casual and advanced users. ✨ Built With Python Language And Pyrogram Telethon Frameworks!
65 |API_IDAPI_HASHBOT_TOKENSESSION_STRING/pyro command, then follow the instructions./info./info./info.SmartUtilBot/cookies.txt).git clone https://github.com/TheSmartDevs/SmartUtilBot.git 312 | cd SmartUtilBot313 |
pip3 install -r requirements.txt316 |
Create a .env file or edit config.py. Example:
API_ID=your_api_id 320 | API_HASH=your_api_hash 321 | BOT_TOKEN=your_bot_token 322 | SESSION_STRING=your_session_string323 |
python3 main.py328 |
screen -S SmartUtilBot 331 | python3 main.py332 |
Detach: Ctrl+A then D. Reattach: screen -r SmartUtilBot
docker compose up --build --remove-orphans336 |
Stop: docker compose down
Note: Configure variables in .env or config.py. Default YouTube cookies path: SmartUtilBot/cookies.txt. Use /settings command for dynamic adjustments.
Deploying SmartUtilBot to Heroku is a straightforward process. Follow these steps to get your bot running on Heroku:
352 |Sign up for a free account at Heroku if you don’t already have one.
355 |Download and install the Heroku Command Line Interface (CLI) from Heroku Dev Center.
358 |Verify installation by running:
359 |heroku --version360 |
Run the following command and follow the prompts to log in:
363 |heroku login364 |
If you haven’t already, clone the SmartUtilBot repository:
367 |git clone https://github.com/TheSmartDevs/SmartUtilBot.git 368 | cd SmartUtilBot369 |
Create a new Heroku app by running:
372 |heroku create your-app-name373 |
Replace your-app-name with a unique name for your app.
Heroku requires a buildpack to install FFmpeg. Add the FFmpeg buildpack to your app:
377 |heroku buildpacks:add https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git -a your-app-name378 |
Add the Python buildpack as well:
379 |heroku buildpacks:add heroku/python -a your-app-name380 |
Configure the mandatory and optional environment variables (see Environment Variables) in Heroku:
383 |heroku config:set API_ID=your_api_id -a your-app-name 384 | heroku config:set API_HASH=your_api_hash -a your-app-name 385 | heroku config:set BOT_TOKEN=your_bot_token -a your-app-name 386 | heroku config:set SESSION_STRING=your_session_string -a your-app-name 387 | heroku config:set OPENAI_API_KEY=your_openai_key -a your-app-name 388 | heroku config:set MONGO_URL=your_mongo_url -a your-app-name 389 | heroku config:set DATABASE_URL=your_database_url -a your-app-name 390 | heroku config:set DB_URL=your_db_url -a your-app-name391 |
Add optional variables as needed, such as GOOGLE_API_KEY, GROQ_API_KEY, etc.
Push the code to Heroku:
395 |git push heroku main396 |
Scale the dyno to run the bot:
397 |heroku ps:scale worker=1 -a your-app-name398 |
Check the logs to ensure the bot is running:
401 |heroku logs --tail -a your-app-name402 |
Interact with your bot on Telegram to confirm it’s operational.
403 |The FFmpeg buildpack automatically installs FFmpeg during deployment. No manual installation is required, unlike local setups.
406 |If you encounter issues with FFmpeg, ensure the buildpack was added correctly and redeploy:
407 |git commit --allow-empty -m "Redeploy for FFmpeg" 408 | git push heroku main409 |
Note: Heroku’s free tier has limitations, such as dyno hours and sleep periods. Consider upgrading to a paid plan for persistent bot availability. Ensure your .env or config.py settings are correctly mirrored in Heroku’s config vars.
Avoid common user client errors by generating a fresh SESSION_STRING using ItsSmartToolBot 🌐
439 |/pyro to start Pyrogram session generation.env or config.pyFrequent restarts using user accounts can trigger Telegram's security system 👀
452 |.env file for secure config managementContributions are always welcome! Please follow these steps:
478 |git checkout -b feature-branch). 🌿git commit -m 'Add new feature'). 💾git push origin feature-branch). 🚀The Main Author Is Abir Arafat Chawdhury Who Made The Base Development Of SmartUtilBot
494 |The Contributor For Many Features Adding Scripts AND APIS He Is Just A PRO
502 |For inquiries or feedback, please feel free to reach out via Telegram.
509 |517 | 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. 518 |519 |