0

I am getting the following error when I try to use client.request_callback_answer(...) pyrogram.errors.exceptions.bad_request_400.BotMethodInvalid: Telegram says: [400 BOT_METHOD_INVALID] - The method can't be used by bots (caused by "messages.GetBotCallbackAnswer")

@app.on_message()
async def get_message(client: Client, msg: Message):
    if estados.check_user(msg): # Check if user has any conversation state
        user_id = msg.from_user.id # Get user_id
        await client.request_callback_answer( # Call function based on saved informations about the callback/conversation state
            chat_id=estados.states[user_id].message.chat.id,
            message_id=estados.states[user_id].message.id,
            callback_data=estados.states[user_id].data,
        )
    else:
        await msg.reply(msg.text) # Just Testing

By doing this I hope to trigger the default callback handling. Am I doing something wrong?

0 Answers0