S
S
Sadig Sadigov2019-02-03 09:36:59
Python
Sadig Sadigov, 2019-02-03 09:36:59

How to get last_message_id from VK-bot?

messages = vk.method("messages.getConversations", {"offset": 0, "count": 20})
        if messages["count"] >= 1:
            id = messages["items"][0]["last_message"]["from_id"]
            body = messages["items"][0]["last_message"]["text"]
            if body == "Привет":
                    vk.method("messages.send", {"peer_id": id, "message":f})
                    eg = messages["items"][0]["last_message"]["from_group"]["message_id"]

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question