2

Проблема с answerCallbackQuery

Вот фрагмент кода:

        #show alert
        bot.answer_callback_query(callback_query_id=call.message.chat.id, show_alert=False, text="test alert")

Консоль:

ApiTelegramException('A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: query is too old and response timeout expired or query ID is invalid')

Запрос точно не "too old" и ID должно считывать верное.

1 ответ 1

1

Не call.message.chat.id а call.id

bot.answer_callback_query(callback_query_id = call.id, text = 'This is a test', show_alert = True)

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.