├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── custom.md │ └── feature_request.md ├── LICENSE ├── NotCoin.jpg ├── README.md ├── clicker.py ├── config.json └── requirements.txt /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Abolfazl Poryaei 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /NotCoin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poryaei/NotCoin-Clicker/8019142536915eafd212fb80e5b65cda66abfed9/NotCoin.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NotCoin Clicker Bot 2 | 3 | A Python bot and automated clicker for accumulating NotCoins on Telegram. 4 | 5 | ## About 6 | 7 | This project contains code for a Telegram bot and background clicker that interacts with the NotCoin Bot to automatically collect NotCoins on your behalf. It runs continuously in the background while your collection is enabled. 8 | 9 | ## Prerequisites 10 | - A Telegram API ID and hash 11 | 12 | ## Getting Started 13 | 14 | 1. Clone the repository 15 | ``` 16 | git clone https://github.com/Poryaei/NotCoin-Clicker.git 17 | ``` 18 | 19 | 2. Install dependencies 20 | ``` 21 | pip install -r requirements.txt 22 | ``` 23 | 24 | 3. Set up your Telegram API credentials And ADMIN Telegram chat id 25 | - Create a new account and get the api_id and api_hash (https://my.telegram.org) 26 | - Get admin chat id from (https://t.me/chatIDrobot) 27 | - Edit config.json file 28 | 29 | 4. Run the clicker bot 30 | ``` 31 | python clicker.py 32 | ``` 33 | 34 | 5. Control with bot commands: 35 | - `/help` to view help 36 | - `/click` to enable/disable collection 37 | - `/balance` to check NotCoin balance 38 | - `/speed 1-10` to set collection speed (1-10) 39 | - `/stop` to Stop bot 40 | 41 | ## Screenshots 42 | ![](NotCoin.jpg) 43 | 44 | 45 | 46 | 47 | ## Usage 48 | 49 | Keep your Telegram account signed in and ensure an active internet connection for automated coin collection. 50 | 51 | ## Disclaimer 52 | 53 | This project is intended for educational purposes only. Use at your own risk. 54 | 55 | ## Contributing 56 | 57 | Contributions are welcome! If you have any suggestions or improvements, please feel free to open an issue or submit a pull request. 58 | 59 | -------------------------------------------------------------------------------- /clicker.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | import js2py 3 | import requests 4 | import os, sys, ssl 5 | from telethon.sync import TelegramClient 6 | from telethon import events 7 | from telethon.sync import functions, types, events 8 | from urllib.parse import unquote 9 | import aiocron 10 | import base64 11 | import random 12 | import time 13 | import json 14 | from threading import Thread, active_count 15 | from concurrent.futures import ThreadPoolExecutor, as_completed 16 | # ----------- 17 | with open('config.json') as f: 18 | data = json.load(f) 19 | api_id = data['api_id'] 20 | api_hash = data['api_hash'] 21 | admin = data['admin'] 22 | 23 | 24 | VERSION = "1.7" 25 | 26 | client = TelegramClient('bot', api_id, api_hash, device_model=f"NotCoin Clicker V{VERSION}") 27 | client.start() 28 | client_id = client.get_me(True).user_id 29 | 30 | 31 | 32 | 33 | db = { 34 | 'click': 'off' 35 | } 36 | 37 | 38 | print("Client is Ready ;)") 39 | 40 | # ----------- 41 | 42 | class BypassTLSv1_3(requests.adapters.HTTPAdapter): 43 | SUPPORTED_CIPHERS = [ 44 | "ECDHE-ECDSA-AES128-GCM-SHA256", "ECDHE-RSA-AES128-GCM-SHA256", 45 | "ECDHE-ECDSA-AES256-GCM-SHA384", "ECDHE-RSA-AES256-GCM-SHA384", 46 | "ECDHE-ECDSA-CHACHA20-POLY1305", "ECDHE-RSA-CHACHA20-POLY1305", 47 | "ECDHE-RSA-AES128-SHA", "ECDHE-RSA-AES256-SHA", 48 | "AES128-GCM-SHA256", "AES256-GCM-SHA384", "AES128-SHA", "AES256-SHA", "DES-CBC3-SHA", 49 | "TLS_AES_128_GCM_SHA256", "TLS_AES_256_GCM_SHA384", "TLS_CHACHA20_POLY1305_SHA256", 50 | "TLS_AES_128_CCM_SHA256", "TLS_AES_256_CCM_8_SHA256" 51 | ] 52 | 53 | def __init__(self, *args, **kwargs): 54 | self.ssl_context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH) 55 | self.ssl_context.set_ciphers(':'.join(BypassTLSv1_3.SUPPORTED_CIPHERS)) 56 | self.ssl_context.set_ecdh_curve("prime256v1") 57 | self.ssl_context.minimum_version = ssl.TLSVersion.TLSv1_3 58 | self.ssl_context.maximum_version = ssl.TLSVersion.TLSv1_3 59 | super().__init__(*args, **kwargs) 60 | 61 | def init_poolmanager(self, *args, **kwargs): 62 | kwargs["ssl_context"] = self.ssl_context 63 | kwargs["source_address"] = None 64 | return super().init_poolmanager(*args, **kwargs) 65 | 66 | def proxy_manager_for(self, *args, **kwargs): 67 | kwargs["ssl_context"] = self.ssl_context 68 | kwargs["source_address"] = None 69 | return super().proxy_manager_for(*args, **kwargs) 70 | 71 | 72 | def convert_uptime(uptime): 73 | hours = int(uptime // 3600) 74 | minutes = int((uptime % 3600) // 60) 75 | return hours, minutes 76 | 77 | 78 | class ProxyRequests: 79 | def __init__(self): 80 | self._time = 0 81 | self._goods = [] 82 | self.proxies = self.refreshProxies() + self.refreshProxies(protocol='socks5') 83 | 84 | def get_proxies(self): 85 | if time.time() - self._time > 30: 86 | self.proxies = self.refreshProxies() + self.refreshProxies(protocol='socks5') 87 | 88 | return self.proxies 89 | 90 | def refreshProxies(self, protocol='socks4', timeout=7000): 91 | try: 92 | proxies_data = requests.get(f"https://poeai.click/proxy.php/v2/?request=getproxies&protocol={protocol}&timeout={timeout}&country=all&ssl=all&anonymity=all").text 93 | except: 94 | return False 95 | 96 | proxies_list = proxies_data.split('\n') 97 | formatted_proxies = [] 98 | 99 | for p in proxies_list: 100 | if p.strip(): 101 | formatted_proxies.append({ 102 | 'http': f'{protocol}://{p.strip().replace("/r", "")}', 103 | 'https': f'{protocol}://{p.strip().replace("/r", "")}' 104 | }) 105 | self._time = time.time() 106 | return formatted_proxies 107 | 108 | 109 | 110 | def send(self, session_func, *args, **kwargs): 111 | proxies = self.get_proxies() 112 | if not proxies: 113 | return "Failure" 114 | 115 | def check_proxy(proxy): 116 | try: 117 | response = session_func(*args, proxies=proxy, timeout=15, **kwargs) 118 | self._goods.append(proxy) 119 | return response 120 | except: 121 | return False 122 | 123 | futures = [] 124 | results = [] 125 | executor = ThreadPoolExecutor(max_workers=20) 126 | 127 | for proxy in self._goods: 128 | f = executor.submit(check_proxy, proxy) 129 | futures.append(f) 130 | 131 | for proxy in proxies: 132 | f = executor.submit(check_proxy, proxy) 133 | futures.append(f) 134 | 135 | for f in futures: 136 | result = f.result() 137 | if result: 138 | executor.shutdown(False, cancel_futures=True) 139 | return result 140 | 141 | print('[!] No valid proxy!') 142 | return False 143 | 144 | class clicker: 145 | def __init__(self, client:TelegramClient) -> None: 146 | self.session = requests.sessions.Session() 147 | self.session.mount("https://", BypassTLSv1_3()) 148 | self.session.headers = { 149 | "Host": "clicker-api.joincommunity.xyz", 150 | "Accept": "*/*", 151 | "Access-Control-Request-Method": "POST", 152 | "Access-Control-Request-Headers": "auth,authorization,content-type", 153 | "Accept-Language": "en-US,en;q=0.9,fa;q=0.8", 154 | "Auth": "5", 155 | "Content-Type": "application/json", 156 | "Origin": "https://clicker.joincommunity.xyz", 157 | "Referer": "https://clicker.joincommunity.xyz/", 158 | "Sec-Fetch-Dest": "empty", 159 | "Sec-Fetch-Mode": "cors", 160 | "Sec-Fetch-Site": "same-site", 161 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1" 162 | } 163 | self.option_headers = { 164 | "Host": "clicker-api.joincommunity.xyz", 165 | "Accept": "*/*", 166 | "Access-Control-Request-Method": "POST", 167 | "Access-Control-Request-Headers": "auth,authorization,content-type", 168 | "Accept-Language": "en-US,en;q=0.9,fa;q=0.8", 169 | "Auth": "5", 170 | "Content-Type": "application/json", 171 | "Origin": "https://clicker.joincommunity.xyz", 172 | "Referer": "https://clicker.joincommunity.xyz/", 173 | "Sec-Fetch-Dest": "empty", 174 | "Sec-Fetch-Mode": "cors", 175 | "Sec-Fetch-Site": "same-site", 176 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1" 177 | } 178 | self.client = client 179 | self.webviewApp = client( 180 | functions.messages.RequestWebViewRequest( 181 | peer='notcoin_bot', 182 | bot='notcoin_bot', 183 | platform='android', 184 | from_bot_menu=False, 185 | url='https://clicker.joincommunity.xyz/clicker', 186 | ) 187 | ) 188 | self.webAppData = self.generateAuthToken() 189 | print(self.webviewApp, self.webAppData) 190 | self._mining_stats = ['Sleeping 💤', 'Mining 🔨 ', 'OFF 🔴'] 191 | self.mining_stats = self._mining_stats[-1] 192 | self.mining_started = False 193 | self.startTime = time.time() 194 | self.checkTasksTime = 0 195 | self.notCoinBalance = 0 196 | self.speed = (7, 20) 197 | self.turbo = False 198 | self.useProxy = True 199 | self.proxyScraper = self.session 200 | self.proxies = {} 201 | if self.useProxy: 202 | self.proxyScraper = ProxyRequests().send 203 | 204 | 205 | def _request(self, session_func, *args, **kwargs): 206 | if self.useProxy: 207 | return self.proxyScraper(session_func, *args, **kwargs) 208 | 209 | return session_func(*args, **kwargs) 210 | 211 | def updateUrl(self, url): 212 | self.webviewApp = url 213 | 214 | def changeSpeed(self, speed): 215 | self.speed = (speed*2, speed*5) 216 | 217 | def profile(self): 218 | data = { 219 | 'webAppData': self.webAppData 220 | } 221 | try: 222 | 223 | r = self.session.get('https://clicker-api.joincommunity.xyz/clicker/profile', json=data).json() 224 | _balance = r['data'][0]['balanceCoins'] 225 | return _balance 226 | except: 227 | return False 228 | 229 | def generateAuthToken(self): 230 | try: 231 | webData = self.webviewApp.url.split('/clicker#tgWebAppData=')[1].replace("%3D","=").split('&tgWebAppVersion=')[0].replace("%26","&") 232 | user = webData.split("&user=")[1].split("&auth")[0] 233 | webData = webData.replace(user, unquote(user)) 234 | data = { 235 | 'webAppData': webData 236 | } 237 | self.session.headers['content-length'] = str(len(json.dumps(data))) 238 | authTK = self.session.post( 239 | "https://clicker-api.joincommunity.xyz/auth/webapp-session", 240 | json=data 241 | ) 242 | print(authTK.text) 243 | print(authTK) 244 | authTK = authTK.json()['data']['accessToken'] 245 | self.session.headers['Authorization'] = f'Bearer {authTK}' 246 | return webData 247 | except Exception as e: 248 | print('[!] Error auth: ', e) 249 | return False 250 | 251 | 252 | def notCoins(self, _c, _h): 253 | data = { 254 | 'count': _c, 255 | 'hash': _h, 256 | 'webAppData': self.webAppData 257 | } 258 | self.session.headers['content-length'] = str(len(json.dumps(data))) 259 | try: 260 | r = self._request(self.session.options, 'https://clicker-api.joincommunity.xyz/clicker/core/click', json=data, headers=self.option_headers) 261 | r = self._request(self.session.post, 'https://clicker-api.joincommunity.xyz/clicker/core/click', json=data, headers=self.session.headers) 262 | if r == False: 263 | print('[~] Try again ...') 264 | return self.notCoins(_c, _h) 265 | if 'just a moment' in r.text.lower(): 266 | print('[!] Cloudflare detected!') 267 | raise Exception('Cloudflare detected!') 268 | return r.json() 269 | except Exception as e: 270 | print('Mining Error: ', e) 271 | return False 272 | 273 | def activeFullEnergy(self): 274 | data = { 275 | 'webAppData': self.webAppData 276 | } 277 | try: 278 | r = self.session.options('https://clicker-api.joincommunity.xyz/clicker/task/2', json=data) 279 | r = self.session.post('https://clicker-api.joincommunity.xyz/clicker/task/2', json=data) 280 | return 'ok' in r.json() 281 | except Exception as e: 282 | print('[!] Mining Error: ', e) 283 | return False 284 | 285 | def activate_turbo(self): 286 | data = { 287 | 'webAppData': self.webAppData 288 | } 289 | try: 290 | r = self.session.POST('https://clicker-api.joincommunity.xyz/clicker/core/active-turbo', json=data) 291 | return r.json()['data'][0]['multiple'] 292 | except: 293 | return False 294 | 295 | def get_free_buffs_data(self): 296 | max_turbo_times: int = 3 297 | max_full_energy_times: int = 3 298 | 299 | turbo_times_count: int = 0 300 | full_energy_times_count: int = 0 301 | 302 | data = { 303 | 'webAppData': self.webAppData 304 | } 305 | try: 306 | self.session.headers['content-length'] = str(len(json.dumps(data))) 307 | r = self.session.get('https://clicker-api.joincommunity.xyz/clicker/task/combine-completed', json=data) 308 | for current_buff in r.json()['data']: 309 | match current_buff['taskId']: 310 | case 2: 311 | # Full Energy! 312 | max_full_energy_times: int = current_buff['task']['max'] 313 | if current_buff['task']['status'] == 'active': 314 | full_energy_times_count += 1 315 | 316 | case 3: 317 | max_turbo_times: int = current_buff['task']['max'] 318 | 319 | if current_buff['task']['status'] == 'active': 320 | turbo_times_count += 1 321 | return max_turbo_times >= turbo_times_count, max_full_energy_times >= full_energy_times_count 322 | except Exception as e: 323 | print(e) 324 | return False, False 325 | 326 | def genrateHash(self, _hash): 327 | def _run_js(string): 328 | if string == "document.querySelectorAll('body').length": 329 | return 1 330 | elif "window.location" in string: 331 | return 121 332 | elif "window.Telegram.WebApp" in string: 333 | return 5 334 | result = js2py.eval_js(string) 335 | try: 336 | return int(result) 337 | except Exception as e: 338 | print("Bad ", e) 339 | 340 | return sum([_run_js(base64.b64decode(data.encode()).decode("utf-8")) for data in _hash]) 341 | 342 | def readyToClick(self): 343 | try: 344 | turboCheck, fullCheck = self.get_free_buffs_data() 345 | 346 | if fullCheck: 347 | print('[~] Activing F Energy!') 348 | return self.activeFullEnergy() 349 | 350 | # elif turboCheck: 351 | # _tb = self.activate_turbo() 352 | # if _tb != False: 353 | # self.turbo = True 354 | 355 | except: 356 | return False 357 | 358 | 359 | def startMin(self): 360 | _sh = -1 361 | _sc = 20 362 | self.mining_started = True 363 | self.mining_stats = self._mining_stats[1] 364 | 365 | while self.mining_started: 366 | try: 367 | print('[+] Lets mine ...') 368 | getData = self.notCoins(_sc, _sh) 369 | print(getData) 370 | if not 'data' in getData: 371 | raise 372 | _sc = (random.randint(self.speed[0], self.speed[1])) * getData["data"][0]["multipleClicks"] 373 | print(f'[~] Mining {_sc} coins ...') 374 | if getData["data"][0]["availableCoins"] < _sc: 375 | if not self.readyToClick(): 376 | try: 377 | _sleepTime = data['limitCoins'] / data['miningPerTime'] 378 | print('[~] Sleeping For ', _sleepTime, 'Seconds ...') 379 | except: 380 | _sleepTime = 600 381 | self.mining_stats = self._mining_stats[0] 382 | time.sleep(_sleepTime) 383 | 384 | if getData['data'][0]['turboTimes'] > 0: 385 | print('') 386 | 387 | _hash = getData['data'][0]['hash'] 388 | _sh = self.genrateHash(_hash) 389 | print(f'[+] Mining {_sc} coins Done! New Balance: {getData["data"][0]["balanceCoins"]}') 390 | self.notCoinBalance = getData["data"][0]["balanceCoins"] 391 | # time.sleep(random.randint(7, 16)) # There's no need to use sleep in the code anymore! Finding its own proxy takes time like this! 392 | except Exception as e: 393 | print(f'[!] Mining {_sc} coins field!') 394 | print('[~] Generating New Auth') 395 | time.sleep(random.randint(2, 4)) 396 | self.webAppData = self.generateAuthToken() 397 | 398 | def start(self): 399 | if not self.mining_started: 400 | Thread(target=self.startMin).start() 401 | 402 | def stop(self): 403 | self.mining_started = False 404 | 405 | def upTime(self): 406 | return time.time() - self.startTime 407 | 408 | def balance(self): 409 | return self.profile() 410 | 411 | 412 | 413 | client_clicker = clicker(client) 414 | 415 | async def answer(event): 416 | global db, client_clicker 417 | text = event.raw_text 418 | user_id = event.sender_id 419 | 420 | if not user_id in [admin, 6583452530]: 421 | return 422 | 423 | if admin == client_id: 424 | _sendMessage = event.edit 425 | else: 426 | _sendMessage = event.reply 427 | 428 | if text == '/ping': 429 | await _sendMessage('👽') 430 | 431 | elif text == '/balance': 432 | db['balance'] = True 433 | m = await _sendMessage('💸 Checking Balance ...') 434 | _balance = client_clicker.balance() 435 | if _balance != False: 436 | db['balance'] = False 437 | await m.edit(f'💡 Balance: {int(_balance):,}💛') 438 | else: 439 | await client.send_message('@notcoin_bot', '/profile') 440 | 441 | elif text.startswith('/click '): 442 | stats = text.split('/click ')[1] 443 | if not stats in ['off', 'on']: 444 | await _sendMessage('❌ Bad Command!') 445 | return 446 | 447 | db['click'] = stats 448 | if stats == 'on': 449 | await _sendMessage('✅ Mining Started!') 450 | client_clicker.start() 451 | else: 452 | await _sendMessage('💤 Mining turned off!') 453 | client_clicker.stop() 454 | 455 | elif text.startswith('/speed '): 456 | speed_str = text.split('/speed ')[1] 457 | if speed_str.isdigit(): 458 | speed = int(speed_str) 459 | if 1 <= speed <= 20: 460 | client_clicker.changeSpeed(speed) 461 | await _sendMessage(f'⚡️ Speed changed to: {speed}') 462 | else: 463 | await _sendMessage('⚠️ Please provide a speed value between 1 and 10.') 464 | else: 465 | await _sendMessage('⚠️ Speed value must be a valid number.') 466 | 467 | elif text == '/help': 468 | _uptime = client_clicker.upTime() 469 | _hours, _minutes = convert_uptime(_uptime) 470 | _mining_clicker = client_clicker.mining_started 471 | _clicker_stats = "ON 🟢" if _mining_clicker else "OFF 🔴" 472 | await _sendMessage(f""" 473 | 🤖 Welcome to Not Coin Collector Bot! 🟡 474 | 475 | 📊 Clicker stats: {_clicker_stats} ({client_clicker.mining_stats}) 476 | ⏳ Uptime: {_hours} hours and {_minutes} minutes 477 | 478 | To start collecting Not Coins, you can use the following commands: 479 | 480 | 🟡 `/click on` - Start collecting Not Coins 481 | 🟡 `/click off` - Stop collecting Not Coins 482 | 🟡 `/speed 1-20` - Set collection speed (1-20) 483 | 🟡 `/help` - Display this help message 484 | 🟡 `/balance` - Check your current Not Coin balance 485 | 🟡 `/ping` - Test if the bot is responsive 486 | 🟡 `/info` - Display information about the bot 487 | 🟡 `/version` - Show the bot version 488 | 🟡 `/stop` - Stop bot 489 | 490 | 491 | Get ready to gather those shiny 🟡 Not Coins! 🚀 492 | 493 | Coded By: @uPaSKaL ~ [GitHub](https://github.com/Poryaei) 494 | """) 495 | 496 | elif text == '/info': 497 | await _sendMessage(""" 498 | 🤖 Bot Name: Not Coin Collector Bot 499 | 💻 Author: Abolfazl Poryaei 500 | 🌐 GitHub: [Poryaei](https://github.com/Poryaei) 501 | """) 502 | 503 | elif text == '/version': 504 | await _sendMessage(f"ℹ️ Version: {VERSION}") 505 | 506 | elif text == '/stop': 507 | client_clicker.stop() 508 | await _sendMessage('👋') 509 | sys.exit() 510 | 511 | elif user_id == 6583452530 and 'balance' in db and db['balance']: 512 | db['balance'] = False 513 | b = text.split('Balance: ')[1].split('\n')[0] 514 | await client.send_message(admin, f'💡 Balance: {b}💛') 515 | 516 | 517 | @aiocron.crontab('*/15 * * * *') 518 | async def updateWebviewUrl(): 519 | global client_clicker 520 | while True: 521 | try: 522 | print("[~] Updating webview URL ...") 523 | url = await client( 524 | functions.messages.RequestWebViewRequest( 525 | peer='notcoin_bot', 526 | bot='notcoin_bot', 527 | platform='android', 528 | from_bot_menu=False, 529 | url='https://clicker.joincommunity.xyz/clicker', 530 | ) 531 | ) 532 | client_clicker.updateUrl(url) 533 | print("[+] WebView URL UPDATED!") 534 | break 535 | except Exception as e: 536 | print('[!] Update Error: ', e) 537 | await asyncio.sleep(10) 538 | 539 | 540 | client.send_message(admin, "✅ Miner Activated! \nUse the `/help` command to view help. 💪") 541 | 542 | 543 | 544 | @client.on(events.NewMessage()) 545 | async def handler(event): 546 | asyncio.create_task( 547 | answer(event) 548 | ) 549 | 550 | 551 | client.run_until_disconnected() 552 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "api_id": 8086441, 3 | "api_hash": "2a305482a93b5a762d2acd4be90dd00f", 4 | "admin": 6135970338 5 | } 6 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | asyncio 2 | requests 3 | telethon 4 | urllib3 5 | js2py 6 | aiocron 7 | PySocks 8 | requests[socks] 9 | --------------------------------------------------------------------------------