2021-07-18 19:28:08,956 (__init__.py:649 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: type of file mismatch"
import telebot
from telebot import types
import config
bot = telebot.TeleBot(config.token)
@bot.inline_handler(func=lambda query: True)
def inline_mode(query):
capibara1 = types.InlineQueryResultCachedPhoto(
id="1",
photo_file_id="BQACAgIAAxkBAAMoYPRAz9GzjKmFR0tvHKIit9diWboAAiUPAAJ21qhLkwABXiJOvTRoIAQ",
caption="Это капибара №1"
)
capibara2 = types.InlineQueryResultCachedPhoto(
id="2",
photo_file_id="BQACAgIAAxkBAAMqYPRA9BbMsxY4vi9OIhRNPXnsdKQAAiYPAAJ21qhL8b6nteTb3V0gBA",
caption="Это капибара №2"
)
bot.answer_inline_query(query.id, [capibara1, capibara2])
if __name__ == '__main__':
bot.polling(none_stop=True)