0
0
01tach102021-06-14 18:52:53
Video
01tach10, 2021-06-14 18:52:53

How to send photo from webcam to telegram bot via opencv?

import telebot
import cv2
img = ' https://imbt.ga/JhfAmGxa3q '
bot = telebot.TeleBot('1842734301:AAFQBiGtWIFFgrvyYjkkzBFEXiLg6Yokriw')
@bot.message_handler(content_types=['text','image'])
def get_text_messages(message ):
if message.text == "PHOTO":
bot.send_message(message.from_user.id, {img})
elif message.text == "/help":
bot.send_message(message.from_user.id, "What would see photo write PHOTO")
else:
bot.send_message(message.from_user.id, "I don't understand you. Type /help.")
bot.polling(none_stop=True, interval=0)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question