How to send a photo with .webp extension via telegram bot

Viewed 516

When I try to send such a photo, I get an error:

example: bot.send_photo(message.chat.id, photo=test.webp)

but i use links (hope it doesn't affect)

ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: wrong type of the web page content"
1 Answers

You have to specify the proper path of the file.

photo_url <- "https://www.gstatic.com/webp/gallery/1.webp"
bot.send_photo(message.chat.id, photo=photo_url)
Related