如何通过电报机器人发送带有 .webp 扩展名的照片

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

当我尝试发送这样的照片时,出现错误:

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

但我使用链接(希望它不会影响)

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

您必须指定正确的文件路径。

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