skip to Main Content

lamda funtion in @bot.message_handler() not working properly in telebot python – Telegram API

I tried to implement the following line of code in python script for a telegram bot building using telebot. @bot.message_handler(func=lambda msg:True if msg.text.startswith('/test')) def test_start(message): msg=bot.send_message(message.chat.id,'This feature is under developement') Above code gives me a syntax error. @bot.message_handler(func=lambda msg:True if…

VIEW QUESTION

Display image from flask send_file (ajax response) into the image tag – Jquery ajax

How do I display the image from a flask send_file ajax response HTML file <button class="button" id="start">Start</button> <script> //start button click event $('#start').click(function() { $.ajax({ url: 'http://127.0.0.1:5000/capture', type: 'GET', contentType: "image/jpg", success: function(result) { document.getElementById('frame').src = 'data:image/jpg,' + result; }…

VIEW QUESTION
Back To Top
Search