@bot.message_handler(content_types=['text'])
def send_text(message):
if message.text.lower() == 'хром':
pyautogui.moveTo(464, 1064, 1)
pyautogui.click()
time.sleep(3)
pyautogui.screenshot('my_screenshot.png')
photo = open('my_screenshot.png', 'rb')
tb.send_photo(message.chat.id, photo)
elif message.text.lower() == 'скрин':
pyautogui.screenshot('my_screenshot.png')
photo = open('my_screenshot.png', 'rb')
tb.send_photo(message.chat.id, photo)
elif message.text.lower() == 'неспящий':
pyautogui.moveTo(500, 500, 1)
pyautogui.moveTo(1, 1, 1)
elif message.text.lower() == 'искать':
pyautogui.hotkey('ctrl', 't')
time.sleep(3)
pyautogui.screenshot('my_screenshot.png')
photo = open('my_screenshot.png', 'rb')
tb.send_photo(message.chat.id, photo)
elif message.text.lower() == 'написать':
message = bot.send_message(message.chat.id, 'Введите текст')
bot.register_next_step_handler(message, msg_0)
def msg_0(message):
msg=message.text
bot.send_message(message.chat.id, message)
bot.register_next_step_handler(message, send_text)
bot.polling()