├── query.txt ├── requirements.txt ├── README.md └── bot.py /query.txt: -------------------------------------------------------------------------------- 1 | query_id= 2 | user= -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | aiohttp 2 | fake-useragent 3 | colorama 4 | pytz -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Birds SUI BOT 2 | Birds SUI BOT 3 | 4 | Register Here : [Birds SUI](https://t.me/birdx2_bot/birdx?startapp=7143283584) 5 | 6 | ## Fitur 7 | 8 | - Auto Get Account Information 9 | - Auto Mint Worms 10 | - Auto Breaking Egg 11 | - Auto Upgrade Boost Speed Level 12 | - Auto Incubate and Upgrade Egg [y/n] 13 | - Multi Accounts 14 | 15 | `Note:` No Complete Task Cause' Captcha 16 | 17 | ## Prasyarat 18 | 19 | Pastikan Anda telah menginstal Python3.9 dan PIP. 20 | 21 | ## Instalasi 22 | 23 | 1. **Kloning repositori:** 24 | ```bash 25 | git clone https://github.com/vonssy/Birds-BOT.git 26 | ``` 27 | ```bash 28 | cd Birds-BOT 29 | ``` 30 | 31 | 2. **Instal Requirements:** 32 | ```bash 33 | pip install -r requirements.txt #or pip3 install -r requirements.txt 34 | ``` 35 | 36 | ## Konfigurasi 37 | 38 | - **query.txt:** Anda akan menemukan file `query.txt` di dalam direktori proyek. Pastikan `query.txt` berisi data yang sesuai dengan format yang diharapkan oleh skrip. Berikut adalah contoh format file: 39 | 40 | ```bash 41 | query_id= 42 | user= 43 | ``` 44 | 45 | ## Jalankan 46 | 47 | ```bash 48 | python bot.py #or python3 bot.py 49 | ``` 50 | 51 | ## Penutup 52 | 53 | Terima kasih telah mengunjungi repository ini, jangan lupa untuk memberikan kontribusi berupa follow dan stars. 54 | Jika Anda memiliki pertanyaan, menemukan masalah, atau memiliki saran untuk perbaikan, jangan ragu untuk menghubungi saya atau membuka *issue* di repositori GitHub ini. 55 | 56 | **vonssy** -------------------------------------------------------------------------------- /bot.py: -------------------------------------------------------------------------------- 1 | from aiohttp import ( 2 | ClientResponseError, 3 | ClientSession, 4 | ClientTimeout 5 | ) 6 | from colorama import * 7 | from datetime import datetime 8 | from urllib.parse import parse_qs, unquote 9 | from fake_useragent import FakeUserAgent 10 | import asyncio, time, json, os, pytz 11 | 12 | wib = pytz.timezone('Asia/Jakarta') 13 | 14 | class Birds: 15 | def __init__(self) -> None: 16 | self.headers = { 17 | 'Accept': 'application/json, text/plain, */*', 18 | 'Accept-Language': 'en-US,en;q=0.9', 19 | 'Cache-Control': 'no-cache', 20 | 'Origin': 'https://birdx.birds.dog', 21 | 'Pragma': 'no-cache', 22 | 'Referer': 'https://birdx.birds.dog/', 23 | 'Sec-Fetch-Dest': 'empty', 24 | 'Sec-Fetch-Mode': 'cors', 25 | 'Sec-Fetch-Site': 'same-site', 26 | 'User-Agent': FakeUserAgent().random 27 | } 28 | self.id = '7143283584' 29 | 30 | def clear_terminal(self): 31 | os.system('cls' if os.name == 'nt' else 'clear') 32 | 33 | def log(self, message): 34 | print( 35 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}" 36 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}{message}", 37 | flush=True 38 | ) 39 | 40 | def welcome(self): 41 | print( 42 | f""" 43 | {Fore.GREEN + Style.BRIGHT}Auto Claim {Fore.BLUE + Style.BRIGHT}Birds SUI - BOT 44 | """ 45 | f""" 46 | {Fore.GREEN + Style.BRIGHT}Rey? {Fore.YELLOW + Style.BRIGHT} 47 | """ 48 | ) 49 | 50 | def format_seconds(self, seconds): 51 | hours, remainder = divmod(seconds, 3600) 52 | minutes, seconds = divmod(remainder, 60) 53 | return f"{int(hours):02}:{int(minutes):02}:{int(seconds):02}" 54 | 55 | def load_data(self, query: str): 56 | query_params = parse_qs(query) 57 | query = query_params.get('user', [None])[0] 58 | 59 | if query: 60 | user_data_json = unquote(query) 61 | user_data = json.loads(user_data_json) 62 | first_name = user_data.get('first_name', '') 63 | last_name = user_data.get('last_name', '') 64 | name = f"{first_name} {last_name}" 65 | username = user_data.get('username', '') 66 | return name, username 67 | else: 68 | raise ValueError("User data not found in query.") 69 | 70 | async def user_data(self, query: str, retries=5): 71 | url = 'https://api.birds.dog/user' 72 | headers = { 73 | **self.headers, 74 | 'Telegramauth': f'tma {query}', 75 | 'Content-Type': 'application/json' 76 | } 77 | 78 | for attempt in range(retries): 79 | try: 80 | async with ClientSession(timeout=ClientTimeout(total=30)) as session: 81 | async with session.get(url=url, headers=headers) as response: 82 | response.raise_for_status() 83 | if response.content_type != "application/json": 84 | return None 85 | 86 | return await response.json() 87 | except (Exception, ClientResponseError) as e: 88 | if attempt < retries - 1: 89 | print( 90 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}" 91 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 92 | f"{Fore.RED + Style.BRIGHT}[ HTTP ERROR ]{Style.RESET_ALL}" 93 | f"{Fore.YELLOW + Style.BRIGHT} Retrying... {Style.RESET_ALL}" 94 | f"{Fore.WHITE + Style.BRIGHT}[{attempt+1}/{retries}]{Style.RESET_ALL}", 95 | end="\r", 96 | flush=True 97 | ) 98 | await asyncio.sleep(2) 99 | else: 100 | return None 101 | 102 | async def user_register(self, query: str, name: str, username: str, retries=5): 103 | url = 'https://api.birds.dog/user' 104 | data = json.dumps({'name':name, 'referId':self.id, 'username':username }) 105 | headers = { 106 | **self.headers, 107 | 'Telegramauth': f'tma {query}', 108 | 'Content-Length': str(len(data)), 109 | 'Content-Type': 'application/json' 110 | } 111 | 112 | for attempt in range(retries): 113 | try: 114 | async with ClientSession(timeout=ClientTimeout(total=30)) as session: 115 | async with session.post(url=url, headers=headers, data=data) as response: 116 | response.raise_for_status() 117 | return await response.json() 118 | except (Exception, ClientResponseError) as e: 119 | if attempt < retries - 1: 120 | print( 121 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}" 122 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 123 | f"{Fore.RED + Style.BRIGHT}[ HTTP ERROR ]{Style.RESET_ALL}" 124 | f"{Fore.YELLOW + Style.BRIGHT} Retrying... {Style.RESET_ALL}" 125 | f"{Fore.WHITE + Style.BRIGHT}[{attempt+1}/{retries}]{Style.RESET_ALL}", 126 | end="\r", 127 | flush=True 128 | ) 129 | await asyncio.sleep(2) 130 | else: 131 | return None 132 | 133 | async def worms_status(self, query: str, retries=5): 134 | url = 'https://worm.birds.dog/worms/mint-status' 135 | headers = { 136 | **self.headers, 137 | 'Authorization': f'tma {query}', 138 | 'Content-Type': 'application/json' 139 | } 140 | 141 | for attempt in range(retries): 142 | try: 143 | async with ClientSession(timeout=ClientTimeout(total=30)) as session: 144 | async with session.get(url=url, headers=headers) as response: 145 | response.raise_for_status() 146 | result = await response.json() 147 | return result['data'] 148 | except (Exception, ClientResponseError) as e: 149 | if attempt < retries - 1: 150 | print( 151 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}" 152 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 153 | f"{Fore.RED + Style.BRIGHT}[ HTTP ERROR ]{Style.RESET_ALL}" 154 | f"{Fore.YELLOW + Style.BRIGHT} Retrying... {Style.RESET_ALL}" 155 | f"{Fore.WHITE + Style.BRIGHT}[{attempt+1}/{retries}]{Style.RESET_ALL}", 156 | end="\r", 157 | flush=True 158 | ) 159 | await asyncio.sleep(2) 160 | else: 161 | return None 162 | 163 | async def mint_worms(self, query: str, retries=5): 164 | url = 'https://worm.birds.dog/worms/mint' 165 | headers = { 166 | **self.headers, 167 | 'Authorization': f'tma {query}', 168 | 'Content-Length': '2', 169 | 'Content-Type': 'application/json' 170 | } 171 | 172 | for attempt in range(retries): 173 | try: 174 | async with ClientSession(timeout=ClientTimeout(total=30)) as session: 175 | async with session.post(url=url, headers=headers, json={}) as response: 176 | response.raise_for_status() 177 | return await response.json() 178 | except (Exception, ClientResponseError) as e: 179 | if attempt < retries - 1: 180 | print( 181 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}" 182 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 183 | f"{Fore.RED + Style.BRIGHT}[ HTTP ERROR ]{Style.RESET_ALL}" 184 | f"{Fore.YELLOW + Style.BRIGHT} Retrying... {Style.RESET_ALL}" 185 | f"{Fore.WHITE + Style.BRIGHT}[{attempt+1}/{retries}]{Style.RESET_ALL}", 186 | end="\r", 187 | flush=True 188 | ) 189 | await asyncio.sleep(2) 190 | else: 191 | return None 192 | 193 | async def egg_join(self, query: str, retries=5): 194 | url = 'https://api.birds.dog/minigame/egg/join' 195 | headers = { 196 | **self.headers, 197 | 'Telegramauth': f'tma {query}', 198 | 'Content-Type': 'application/json' 199 | } 200 | 201 | for attempt in range(retries): 202 | try: 203 | async with ClientSession(timeout=ClientTimeout(total=30)) as session: 204 | async with session.get(url=url, headers=headers) as response: 205 | response.raise_for_status() 206 | return await response.json() 207 | except (Exception, ClientResponseError) as e: 208 | if attempt < retries - 1: 209 | print( 210 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}" 211 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 212 | f"{Fore.RED + Style.BRIGHT}[ HTTP ERROR ]{Style.RESET_ALL}" 213 | f"{Fore.YELLOW + Style.BRIGHT} Retrying... {Style.RESET_ALL}" 214 | f"{Fore.WHITE + Style.BRIGHT}[{attempt+1}/{retries}]{Style.RESET_ALL}", 215 | end="\r", 216 | flush=True 217 | ) 218 | await asyncio.sleep(2) 219 | else: 220 | return None 221 | 222 | async def egg_turn(self, query: str, retries=5): 223 | url = 'https://api.birds.dog/minigame/egg/turn' 224 | headers = { 225 | **self.headers, 226 | 'Telegramauth': f'tma {query}', 227 | 'Content-Type': 'application/json' 228 | } 229 | 230 | for attempt in range(retries): 231 | try: 232 | async with ClientSession(timeout=ClientTimeout(total=30)) as session: 233 | async with session.get(url=url, headers=headers) as response: 234 | response.raise_for_status() 235 | return await response.json() 236 | except (Exception, ClientResponseError) as e: 237 | if attempt < retries - 1: 238 | print( 239 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}" 240 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 241 | f"{Fore.RED + Style.BRIGHT}[ HTTP ERROR ]{Style.RESET_ALL}" 242 | f"{Fore.YELLOW + Style.BRIGHT} Retrying... {Style.RESET_ALL}" 243 | f"{Fore.WHITE + Style.BRIGHT}[{attempt+1}/{retries}]{Style.RESET_ALL}", 244 | end="\r", 245 | flush=True 246 | ) 247 | await asyncio.sleep(2) 248 | else: 249 | return None 250 | 251 | async def egg_play(self, query: str, retries=5): 252 | url = 'https://api.birds.dog/minigame/egg/play' 253 | headers = { 254 | **self.headers, 255 | 'Telegramauth': f'tma {query}', 256 | 'Content-Type': 'application/json' 257 | } 258 | 259 | for attempt in range(retries): 260 | try: 261 | async with ClientSession(timeout=ClientTimeout(total=30)) as session: 262 | async with session.get(url=url, headers=headers) as response: 263 | response.raise_for_status() 264 | return await response.json() 265 | except (Exception, ClientResponseError) as e: 266 | if attempt < retries - 1: 267 | print( 268 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}" 269 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 270 | f"{Fore.RED + Style.BRIGHT}[ HTTP ERROR ]{Style.RESET_ALL}" 271 | f"{Fore.YELLOW + Style.BRIGHT} Retrying... {Style.RESET_ALL}" 272 | f"{Fore.WHITE + Style.BRIGHT}[{attempt+1}/{retries}]{Style.RESET_ALL}", 273 | end="\r", 274 | flush=True 275 | ) 276 | await asyncio.sleep(2) 277 | else: 278 | return None 279 | 280 | async def egg_claim(self, query: str, retries=5): 281 | url = 'https://api.birds.dog/minigame/egg/claim' 282 | headers = { 283 | **self.headers, 284 | 'Telegramauth': f'tma {query}', 285 | 'Content-Type': 'application/json' 286 | } 287 | 288 | for attempt in range(retries): 289 | try: 290 | async with ClientSession(timeout=ClientTimeout(total=30)) as session: 291 | async with session.get(url=url, headers=headers) as response: 292 | response.raise_for_status() 293 | return True 294 | except (Exception, ClientResponseError) as e: 295 | if attempt < retries - 1: 296 | print( 297 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}" 298 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 299 | f"{Fore.RED + Style.BRIGHT}[ HTTP ERROR ]{Style.RESET_ALL}" 300 | f"{Fore.YELLOW + Style.BRIGHT} Retrying... {Style.RESET_ALL}" 301 | f"{Fore.WHITE + Style.BRIGHT}[{attempt+1}/{retries}]{Style.RESET_ALL}", 302 | end="\r", 303 | flush=True 304 | ) 305 | await asyncio.sleep(2) 306 | else: 307 | return None 308 | 309 | async def incubate_info(self, query: str, retries=5): 310 | url = 'https://api.birds.dog/minigame/incubate/info' 311 | headers = { 312 | **self.headers, 313 | 'Telegramauth': f'tma {query}', 314 | 'Content-Type': 'application/json' 315 | } 316 | 317 | for attempt in range(retries): 318 | try: 319 | async with ClientSession(timeout=ClientTimeout(total=30)) as session: 320 | async with session.get(url=url, headers=headers) as response: 321 | if response.status == 400: 322 | return None 323 | 324 | response.raise_for_status() 325 | return await response.json() 326 | except (Exception, ClientResponseError) as e: 327 | if attempt < retries - 1: 328 | print( 329 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}" 330 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 331 | f"{Fore.RED + Style.BRIGHT}[ HTTP ERROR ]{Style.RESET_ALL}" 332 | f"{Fore.YELLOW + Style.BRIGHT} Retrying... {Style.RESET_ALL}" 333 | f"{Fore.WHITE + Style.BRIGHT}[{attempt+1}/{retries}]{Style.RESET_ALL}", 334 | end="\r", 335 | flush=True 336 | ) 337 | await asyncio.sleep(2) 338 | else: 339 | return None 340 | 341 | async def incubate_upgrade(self, query: str, retries=5): 342 | url = 'https://api.birds.dog/minigame/incubate/upgrade' 343 | headers = { 344 | **self.headers, 345 | 'Telegramauth': f'tma {query}', 346 | 'Content-Type': 'application/json' 347 | } 348 | 349 | for attempt in range(retries): 350 | try: 351 | async with ClientSession(timeout=ClientTimeout(total=30)) as session: 352 | async with session.get(url=url, headers=headers) as response: 353 | if response.status == 400: 354 | return None 355 | 356 | response.raise_for_status() 357 | return await response.json() 358 | except (Exception, ClientResponseError) as e: 359 | if attempt < retries - 1: 360 | print( 361 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}" 362 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 363 | f"{Fore.RED + Style.BRIGHT}[ HTTP ERROR ]{Style.RESET_ALL}" 364 | f"{Fore.YELLOW + Style.BRIGHT} Retrying... {Style.RESET_ALL}" 365 | f"{Fore.WHITE + Style.BRIGHT}[{attempt+1}/{retries}]{Style.RESET_ALL}", 366 | end="\r", 367 | flush=True 368 | ) 369 | await asyncio.sleep(2) 370 | else: 371 | return None 372 | 373 | async def confirm_upgrade(self, query: str, retries=5): 374 | url = 'https://api.birds.dog/minigame/incubate/confirm-upgraded' 375 | headers = { 376 | **self.headers, 377 | 'Telegramauth': f'tma {query}', 378 | 'Content-Length': '0', 379 | 'Content-Type': 'application/json' 380 | } 381 | 382 | for attempt in range(retries): 383 | try: 384 | async with ClientSession(timeout=ClientTimeout(total=30)) as session: 385 | async with session.post(url=url, headers=headers) as response: 386 | response.raise_for_status() 387 | return True 388 | except (Exception, ClientResponseError) as e: 389 | if attempt < retries - 1: 390 | print( 391 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}" 392 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 393 | f"{Fore.RED + Style.BRIGHT}[ HTTP ERROR ]{Style.RESET_ALL}" 394 | f"{Fore.YELLOW + Style.BRIGHT} Retrying... {Style.RESET_ALL}" 395 | f"{Fore.WHITE + Style.BRIGHT}[{attempt+1}/{retries}]{Style.RESET_ALL}", 396 | end="\r", 397 | flush=True 398 | ) 399 | await asyncio.sleep(2) 400 | else: 401 | return None 402 | 403 | async def boost_speed(self, query: str, retries=5): 404 | url = 'https://api.birds.dog/minigame/boost-speed' 405 | headers = { 406 | **self.headers, 407 | 'Telegramauth': f'tma {query}', 408 | 'Content-Type': 'application/json' 409 | } 410 | 411 | for attempt in range(retries): 412 | try: 413 | async with ClientSession(timeout=ClientTimeout(total=30)) as session: 414 | async with session.get(url=url, headers=headers) as response: 415 | response.raise_for_status() 416 | return await response.json() 417 | except (Exception, ClientResponseError) as e: 418 | if attempt < retries - 1: 419 | print( 420 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}" 421 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 422 | f"{Fore.RED + Style.BRIGHT}[ HTTP ERROR ]{Style.RESET_ALL}" 423 | f"{Fore.YELLOW + Style.BRIGHT} Retrying... {Style.RESET_ALL}" 424 | f"{Fore.WHITE + Style.BRIGHT}[{attempt+1}/{retries}]{Style.RESET_ALL}", 425 | end="\r", 426 | flush=True 427 | ) 428 | await asyncio.sleep(2) 429 | else: 430 | return None 431 | 432 | async def update_speed(self, query: str, next_speed: int, retries=5): 433 | url = 'https://api.birds.dog/minigame/boost-speed/update-speed' 434 | data = json.dumps({'speed':next_speed}) 435 | headers = { 436 | **self.headers, 437 | 'Telegramauth': f'tma {query}', 438 | 'Content-Length': str(len(data)), 439 | 'Content-Type': 'application/json' 440 | } 441 | 442 | for attempt in range(retries): 443 | try: 444 | async with ClientSession(timeout=ClientTimeout(total=30)) as session: 445 | async with session.post(url=url, headers=headers, data=data) as response: 446 | if response.status == 400: 447 | return None 448 | 449 | response.raise_for_status() 450 | return await response.json() 451 | except (Exception, ClientResponseError) as e: 452 | if attempt < retries - 1: 453 | print( 454 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}" 455 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 456 | f"{Fore.RED + Style.BRIGHT}[ HTTP ERROR ]{Style.RESET_ALL}" 457 | f"{Fore.YELLOW + Style.BRIGHT} Retrying... {Style.RESET_ALL}" 458 | f"{Fore.WHITE + Style.BRIGHT}[{attempt+1}/{retries}]{Style.RESET_ALL}", 459 | end="\r", 460 | flush=True 461 | ) 462 | await asyncio.sleep(2) 463 | else: 464 | return None 465 | 466 | def question(self): 467 | while True: 468 | upgrade_egg = input("Auto Incubate and Upgrade Egg? [y/n] -> ").strip().lower() 469 | if upgrade_egg in ["y", "n"]: 470 | upgrade_egg = upgrade_egg == "y" 471 | break 472 | else: 473 | print(f"{Fore.RED+Style.BRIGHT}Invalid Input.{Fore.WHITE+Style.BRIGHT} Choose 'y' to Yes or 'n' to Skip.{Style.RESET_ALL}") 474 | 475 | return upgrade_egg 476 | 477 | async def process_query(self, query: str, upgarde_egg: bool): 478 | name, username = self.load_data(query) 479 | 480 | user = await self.user_data(query) 481 | if not user: 482 | register = await self.user_register(query, name, username) 483 | if not register: 484 | self.log( 485 | f"{Fore.MAGENTA+Style.BRIGHT}[ Account{Style.RESET_ALL}" 486 | f"{Fore.WHITE+Style.BRIGHT} {name} {Style.RESET_ALL}" 487 | f"{Fore.RED+Style.BRIGHT}Data Is None{Style.RESET_ALL}" 488 | f"{Fore.MAGENTA+Style.BRIGHT} ]{Style.RESET_ALL}" 489 | ) 490 | return 491 | 492 | user = await self.user_data(query) 493 | 494 | self.log( 495 | f"{Fore.MAGENTA+Style.BRIGHT}[ Account{Style.RESET_ALL}" 496 | f"{Fore.WHITE+Style.BRIGHT} {user['name']} {Style.RESET_ALL}" 497 | f"{Fore.MAGENTA+Style.BRIGHT}] [ Balance{Style.RESET_ALL}" 498 | f"{Fore.WHITE+Style.BRIGHT} {user['balance']:.1f} Birds {Style.RESET_ALL}" 499 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 500 | ) 501 | await asyncio.sleep(3) 502 | 503 | worms = await self.worms_status(query) 504 | if worms: 505 | if worms['status'] == 'MINT_OPEN': 506 | mint = await self.mint_worms(query) 507 | if mint and mint['message'] == 'SUCCESS': 508 | self.log( 509 | f"{Fore.MAGENTA+Style.BRIGHT}[ Worms{Style.RESET_ALL}" 510 | f"{Fore.WHITE+Style.BRIGHT} {mint['minted']['type']} {Style.RESET_ALL}" 511 | f"{Fore.GREEN+Style.BRIGHT} Is Minted {Style.RESET_ALL}" 512 | f"{Fore.MAGENTA+Style.BRIGHT}] [ Reward {Style.RESET_ALL}" 513 | f"{Fore.WHITE+Style.BRIGHT} {mint['minted']['reward']} Birds {Style.RESET_ALL}" 514 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 515 | ) 516 | else: 517 | self.log( 518 | f"{Fore.MAGENTA+Style.BRIGHT}[ Worms{Style.RESET_ALL}" 519 | f"{Fore.RED+Style.BRIGHT} Is Escaped {Style.RESET_ALL}" 520 | f"{Fore.MAGENTA+Style.BRIGHT}-{Style.RESET_ALL}" 521 | f"{Fore.YELLOW+Style.BRIGHT} Try Again Later {Style.RESET_ALL}" 522 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 523 | ) 524 | else: 525 | next_mint = worms['nextMintTime'] 526 | next_mint_utc = datetime.strptime(next_mint, '%Y-%m-%dT%H:%M:%S.%fZ') 527 | next_mint_wib = pytz.utc.localize(next_mint_utc).astimezone(wib).strftime('%x %X %Z') 528 | self.log( 529 | f"{Fore.MAGENTA+Style.BRIGHT}[ Worms{Style.RESET_ALL}" 530 | f"{Fore.YELLOW+Style.BRIGHT} Is Already Minted {Style.RESET_ALL}" 531 | f"{Fore.MAGENTA+Style.BRIGHT}] [ Next Mint at{Style.RESET_ALL}" 532 | f"{Fore.WHITE+Style.BRIGHT} {next_mint_wib} {Style.RESET_ALL}" 533 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 534 | ) 535 | else: 536 | self.log( 537 | f"{Fore.MAGENTA+Style.BRIGHT}[ Worms{Style.RESET_ALL}" 538 | f"{Fore.RED+Style.BRIGHT} Data Is None {Style.RESET_ALL}" 539 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 540 | ) 541 | await asyncio.sleep(3) 542 | 543 | join = await self.egg_join(query) 544 | turn = await self.egg_turn(query) 545 | if join and turn: 546 | count = turn['turn'] 547 | reward_total = 0 548 | if count > 0: 549 | self.log( 550 | f"{Fore.MAGENTA+Style.BRIGHT}[ Breaking Egg{Style.RESET_ALL}" 551 | f"{Fore.GREEN+Style.BRIGHT} Is Started {Style.RESET_ALL}" 552 | f"{Fore.MAGENTA+Style.BRIGHT}] [ Turn{Style.RESET_ALL}" 553 | f"{Fore.WHITE+Style.BRIGHT} {count} Left {Style.RESET_ALL}" 554 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 555 | ) 556 | await asyncio.sleep(1) 557 | 558 | while count > 0: 559 | if count <= 0: 560 | break 561 | 562 | play = await self.egg_play(query) 563 | if play: 564 | count = play['turn'] 565 | reward = play['result'] 566 | self.log( 567 | f"{Fore.MAGENTA+Style.BRIGHT}[ Breaking Egg{Style.RESET_ALL}" 568 | f"{Fore.GREEN+Style.BRIGHT} Is Success {Style.RESET_ALL}" 569 | f"{Fore.MAGENTA+Style.BRIGHT}] [ Reward{Style.RESET_ALL}" 570 | f"{Fore.WHITE+Style.BRIGHT} {reward} Birds {Style.RESET_ALL}" 571 | f"{Fore.MAGENTA+Style.BRIGHT}] [ Turn{Style.RESET_ALL}" 572 | f"{Fore.WHITE+Style.BRIGHT} {count} Left {Style.RESET_ALL}" 573 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 574 | ) 575 | else: 576 | break 577 | 578 | reward_total += reward 579 | 580 | await asyncio.sleep(2) 581 | 582 | claim = await self.egg_claim(query) 583 | if claim: 584 | self.log( 585 | f"{Fore.MAGENTA+Style.BRIGHT}[ Breaking Egg{Style.RESET_ALL}" 586 | f"{Fore.GREEN+Style.BRIGHT} Is Claimed {Style.RESET_ALL}" 587 | f"{Fore.MAGENTA+Style.BRIGHT}] [ Reward Total{Style.RESET_ALL}" 588 | f"{Fore.WHITE+Style.BRIGHT} {reward_total} Birds {Style.RESET_ALL}" 589 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 590 | ) 591 | else: 592 | self.log( 593 | f"{Fore.MAGENTA+Style.BRIGHT}[ Breaking Egg{Style.RESET_ALL}" 594 | f"{Fore.RED+Style.BRIGHT} Isn't Claimed {Style.RESET_ALL}" 595 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 596 | ) 597 | else: 598 | self.log( 599 | f"{Fore.MAGENTA+Style.BRIGHT}[ Breaking Egg{Style.RESET_ALL}" 600 | f"{Fore.YELLOW+Style.BRIGHT} No Available Turn Left {Style.RESET_ALL}" 601 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 602 | ) 603 | else: 604 | self.log( 605 | f"{Fore.MAGENTA+Style.BRIGHT}[ Breaking Egg{Style.RESET_ALL}" 606 | f"{Fore.RED+Style.BRIGHT} Data Is None {Style.RESET_ALL}" 607 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 608 | ) 609 | await asyncio.sleep(3) 610 | 611 | incubate = await self.incubate_info(query) 612 | if not incubate: 613 | upgrade = await self.incubate_upgrade(query) 614 | if upgrade: 615 | upgrade_time = upgrade['upgradedAt'] / 1000 616 | duration = upgrade['duration'] * 3600 617 | complete_incubate = upgrade_time + duration 618 | complete_incubate_wib = datetime.fromtimestamp(complete_incubate).astimezone(wib).strftime('%x %X %Z') 619 | 620 | self.log( 621 | f"{Fore.MAGENTA+Style.BRIGHT}[ Egg{Style.RESET_ALL}" 622 | f"{Fore.GREEN+Style.BRIGHT} Is Incubated {Style.RESET_ALL}" 623 | f"{Fore.MAGENTA+Style.BRIGHT}] [ Complete at{Style.RESET_ALL}" 624 | f"{Fore.WHITE+Style.BRIGHT} {complete_incubate_wib} {Style.RESET_ALL}" 625 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 626 | ) 627 | 628 | else: 629 | user = await self.user_data(query) 630 | if not user: 631 | self.log( 632 | f"{Fore.MAGENTA+Style.BRIGHT}[ Egg{Style.RESET_ALL}" 633 | f"{Fore.RED+Style.BRIGHT} GET Balance Failed {Style.RESET_ALL}" 634 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 635 | ) 636 | return 637 | 638 | current_level = incubate['level'] 639 | next_level_birds = incubate['nextLevel'] 640 | 641 | balance = user['balance'] 642 | boost = await self.boost_speed(query) 643 | if boost: 644 | current_speed = boost['speed'] 645 | self.log( 646 | f"{Fore.MAGENTA+Style.BRIGHT}[ Egg{Style.RESET_ALL}" 647 | f"{Fore.WHITE+Style.BRIGHT} Level {current_level} {Style.RESET_ALL}" 648 | f"{Fore.MAGENTA+Style.BRIGHT}] [ Balance{Style.RESET_ALL}" 649 | f"{Fore.WHITE+Style.BRIGHT} {balance:.1f} Birds {Style.RESET_ALL}" 650 | f"{Fore.MAGENTA+Style.BRIGHT}] [ Speed{Style.RESET_ALL}" 651 | f"{Fore.WHITE+Style.BRIGHT} x{current_speed} {Style.RESET_ALL}" 652 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 653 | ) 654 | await asyncio.sleep(1) 655 | 656 | boost_level = [1, 1.2, 1.4, 1.6, 1.8, 2, 2.5] 657 | if current_speed in boost_level: 658 | current_index = boost_level.index(current_speed) 659 | if current_index + 1 < len(boost_level): 660 | next_speed = boost_level[current_index + 1] 661 | 662 | update_boost = await self.update_speed(query, next_speed) 663 | if update_boost: 664 | self.log( 665 | f"{Fore.MAGENTA+Style.BRIGHT}[ Boost Speed{Style.RESET_ALL}" 666 | f"{Fore.GREEN+Style.BRIGHT} Is Upgraded {Style.RESET_ALL}" 667 | f"{Fore.MAGENTA+Style.BRIGHT}] [ Spped{Style.RESET_ALL}" 668 | f"{Fore.WHITE+Style.BRIGHT} x{next_speed} {Style.RESET_ALL}" 669 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 670 | ) 671 | else: 672 | self.log( 673 | f"{Fore.MAGENTA+Style.BRIGHT}[ Boost Speed{Style.RESET_ALL}" 674 | f"{Fore.YELLOW+Style.BRIGHT} Isn't Upgraded {Style.RESET_ALL}" 675 | f"{Fore.MAGENTA+Style.BRIGHT}] [ Reason{Style.RESET_ALL}" 676 | f"{Fore.WHITE+Style.BRIGHT} Not Eligible {Style.RESET_ALL}" 677 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 678 | ) 679 | else: 680 | self.log( 681 | f"{Fore.MAGENTA+Style.BRIGHT}[ Boost Speed{Style.RESET_ALL}" 682 | f"{Fore.GREEN+Style.BRIGHT} Already at The Maximum Speed Level {Style.RESET_ALL}" 683 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 684 | ) 685 | else: 686 | self.log( 687 | f"{Fore.MAGENTA+Style.BRIGHT}[ Boost Speed{Style.RESET_ALL}" 688 | f"{Fore.RED+Style.BRIGHT} Current Speed Not Found in Boost Levels {Style.RESET_ALL}" 689 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 690 | ) 691 | await asyncio.sleep(1) 692 | 693 | if upgarde_egg: 694 | status = incubate['status'] 695 | if status == "confirmed": 696 | if current_level < 35: 697 | required_balance = next_level_birds['birds'] 698 | 699 | if balance >= required_balance: 700 | upgrade = await self.incubate_upgrade(query) 701 | if upgrade: 702 | upgrade_time = upgrade['upgradedAt'] / 1000 703 | duration = upgrade['duration'] * 3600 704 | booster = incubate['speed'] 705 | duration_with_boost = duration / booster 706 | complete_incubate = upgrade_time + duration_with_boost 707 | complete_incubate_wib = datetime.fromtimestamp(complete_incubate).astimezone(wib).strftime('%x %X %Z') 708 | 709 | self.log( 710 | f"{Fore.MAGENTA+Style.BRIGHT}[ Egg{Style.RESET_ALL}" 711 | f"{Fore.GREEN+Style.BRIGHT} Was Successfully Incubated {Style.RESET_ALL}" 712 | f"{Fore.WHITE+Style.BRIGHT}to Level {next_level_birds['level']}{Style.RESET_ALL}" 713 | f"{Fore.MAGENTA+Style.BRIGHT} ] [ Complete at{Style.RESET_ALL}" 714 | f"{Fore.WHITE+Style.BRIGHT} {complete_incubate_wib} {Style.RESET_ALL}" 715 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 716 | ) 717 | else: 718 | self.log( 719 | f"{Fore.MAGENTA+Style.BRIGHT}[ Egg{Style.RESET_ALL}" 720 | f"{Fore.RED+Style.BRIGHT} Failed to Incubate {Style.RESET_ALL}" 721 | f"{Fore.WHITE+Style.BRIGHT}to Level {next_level_birds['level']}{Style.RESET_ALL}" 722 | f"{Fore.MAGENTA+Style.BRIGHT} ]{Style.RESET_ALL}" 723 | ) 724 | else: 725 | need_more = required_balance - user['balance'] 726 | self.log( 727 | f"{Fore.MAGENTA+Style.BRIGHT}[ Egg{Style.RESET_ALL}" 728 | f"{Fore.YELLOW+Style.BRIGHT} Not Eligible to Incubate {Style.RESET_ALL}" 729 | f"{Fore.MAGENTA+Style.BRIGHT}] [ Reason{Style.RESET_ALL}" 730 | f"{Fore.WHITE+Style.BRIGHT} -{need_more:.1f} Birds {Style.RESET_ALL}" 731 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 732 | ) 733 | else: 734 | self.log( 735 | f"{Fore.MAGENTA+Style.BRIGHT}[ Egg{Style.RESET_ALL}" 736 | f"{Fore.GREEN+Style.BRIGHT} Already at The Maximum Level {Style.RESET_ALL}" 737 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 738 | ) 739 | 740 | elif status == "processing": 741 | upgrade_time = incubate['upgradedAt'] / 1000 742 | duration = incubate['duration'] * 3600 743 | booster = incubate['speed'] 744 | duration_with_boost = duration / booster 745 | complete_incubate = upgrade_time + duration_with_boost 746 | complete_incubate_wib = datetime.fromtimestamp(complete_incubate).astimezone(wib).strftime('%x %X %Z') 747 | 748 | now = int(time.time()) 749 | 750 | if now >= complete_incubate: 751 | confirm = await self.confirm_upgrade(query) 752 | if confirm: 753 | self.log( 754 | f"{Fore.MAGENTA+Style.BRIGHT}[ Egg{Style.RESET_ALL}" 755 | f"{Fore.GREEN+Style.BRIGHT} Upgrade Confirmed Succesfully {Style.RESET_ALL}" 756 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 757 | ) 758 | await asyncio.sleep(3) 759 | 760 | incubate = await self.incubate_info(query) 761 | if not incubate: 762 | self.log( 763 | f"{Fore.MAGENTA+Style.BRIGHT}[ Egg{Style.RESET_ALL}" 764 | f"{Fore.RED+Style.BRIGHT} Data Is None {Style.RESET_ALL}" 765 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 766 | ) 767 | return 768 | 769 | current_level = incubate['level'] 770 | next_level_birds = incubate['nextLevel'] 771 | required_balance = next_level_birds['birds'] 772 | 773 | if current_level < 35: 774 | if balance >= required_balance: 775 | upgrade = await self.incubate_upgrade(query) 776 | if upgrade: 777 | upgrade_time = upgrade['upgradedAt'] / 1000 778 | duration = upgrade['duration'] * 3600 779 | booster = incubate['speed'] 780 | duration_with_boost = duration / booster 781 | complete_incubate = upgrade_time + duration_with_boost 782 | complete_incubate_wib = datetime.fromtimestamp(complete_incubate).astimezone(wib).strftime('%x %X %Z') 783 | 784 | self.log( 785 | f"{Fore.MAGENTA+Style.BRIGHT}[ Egg{Style.RESET_ALL}" 786 | f"{Fore.GREEN+Style.BRIGHT} Was Successfully Incubated {Style.RESET_ALL}" 787 | f"{Fore.WHITE+Style.BRIGHT}to Level {next_level_birds['level']}{Style.RESET_ALL}" 788 | f"{Fore.MAGENTA+Style.BRIGHT} ] [ Complete at{Style.RESET_ALL}" 789 | f"{Fore.WHITE+Style.BRIGHT} {complete_incubate_wib} {Style.RESET_ALL}" 790 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 791 | ) 792 | else: 793 | self.log( 794 | f"{Fore.MAGENTA+Style.BRIGHT}[ Egg{Style.RESET_ALL}" 795 | f"{Fore.RED+Style.BRIGHT} Failed to Incubate {Style.RESET_ALL}" 796 | f"{Fore.WHITE+Style.BRIGHT}to Level {next_level_birds['level']}{Style.RESET_ALL}" 797 | f"{Fore.MAGENTA+Style.BRIGHT} ]{Style.RESET_ALL}" 798 | ) 799 | else: 800 | need_more = required_balance - user['balance'] 801 | self.log( 802 | f"{Fore.MAGENTA+Style.BRIGHT}[ Egg{Style.RESET_ALL}" 803 | f"{Fore.YELLOW+Style.BRIGHT} Not Eligible to Incubate {Style.RESET_ALL}" 804 | f"{Fore.MAGENTA+Style.BRIGHT}] [ Reason{Style.RESET_ALL}" 805 | f"{Fore.WHITE+Style.BRIGHT} -{need_more:.1f} Birds {Style.RESET_ALL}" 806 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 807 | ) 808 | else: 809 | self.log( 810 | f"{Fore.MAGENTA+Style.BRIGHT}[ Egg{Style.RESET_ALL}" 811 | f"{Fore.GREEN+Style.BRIGHT} Already at The Maximum Level {Style.RESET_ALL}" 812 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 813 | ) 814 | else: 815 | self.log( 816 | f"{Fore.MAGENTA+Style.BRIGHT}[ Egg{Style.RESET_ALL}" 817 | f"{Fore.RED+Style.BRIGHT} Failed to Confirm Upgrade {Style.RESET_ALL}" 818 | f"{Fore.MAGENTA+Style.BRIGHT} ]{Style.RESET_ALL}" 819 | ) 820 | else: 821 | self.log( 822 | f"{Fore.MAGENTA+Style.BRIGHT}[ Egg{Style.RESET_ALL}" 823 | f"{Fore.YELLOW+Style.BRIGHT} In Incubation {Style.RESET_ALL}" 824 | f"{Fore.MAGENTA+Style.BRIGHT}] [ Confirm at{Style.RESET_ALL}" 825 | f"{Fore.WHITE+Style.BRIGHT} {complete_incubate_wib} {Style.RESET_ALL}" 826 | f"{Fore.MAGENTA+Style.BRIGHT}]{Style.RESET_ALL}" 827 | ) 828 | 829 | else: 830 | self.log( 831 | f"{Fore.MAGENTA+Style.BRIGHT}[ Egg{Style.RESET_ALL}" 832 | f"{Fore.WHITE+Style.BRIGHT} Incubate and Upgrade {Style.RESET_ALL}" 833 | f"{Fore.YELLOW+Style.BRIGHT}Skipped{Style.RESET_ALL}" 834 | f"{Fore.MAGENTA+Style.BRIGHT} ]{Style.RESET_ALL}" 835 | ) 836 | 837 | async def main(self): 838 | try: 839 | with open('query.txt', 'r') as file: 840 | queries = [line.strip() for line in file if line.strip()] 841 | 842 | upgrade_egg = self.question() 843 | 844 | while True: 845 | self.clear_terminal() 846 | await asyncio.sleep(1) 847 | self.welcome() 848 | self.log( 849 | f"{Fore.GREEN + Style.BRIGHT}Account's Total: {Style.RESET_ALL}" 850 | f"{Fore.WHITE + Style.BRIGHT}{len(queries)}{Style.RESET_ALL}" 851 | ) 852 | self.log(f"{Fore.CYAN + Style.BRIGHT}-{Style.RESET_ALL}"*75) 853 | 854 | for query in queries: 855 | query = query.strip() 856 | if query: 857 | await self.process_query(query, upgrade_egg) 858 | self.log(f"{Fore.CYAN+Style.BRIGHT}-{Style.RESET_ALL}"*75) 859 | await asyncio.sleep(3) 860 | 861 | seconds = 1800 862 | while seconds > 0: 863 | formatted_time = self.format_seconds(seconds) 864 | print( 865 | f"{Fore.CYAN+Style.BRIGHT}[ Wait for{Style.RESET_ALL}" 866 | f"{Fore.WHITE+Style.BRIGHT} {formatted_time} {Style.RESET_ALL}" 867 | f"{Fore.CYAN+Style.BRIGHT}... ]{Style.RESET_ALL}", 868 | end="\r" 869 | ) 870 | await asyncio.sleep(1) 871 | seconds -= 1 872 | 873 | except Exception as e: 874 | self.log(f"{Fore.RED + Style.BRIGHT}An error occurred: {e}{Style.RESET_ALL}") 875 | return 876 | 877 | if __name__ == "__main__": 878 | try: 879 | bot = Birds() 880 | asyncio.run(bot.main()) 881 | except KeyboardInterrupt: 882 | print( 883 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}" 884 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 885 | f"{Fore.RED + Style.BRIGHT}[ EXIT ] Birds SUI - BOT{Style.RESET_ALL} " 886 | ) --------------------------------------------------------------------------------