Answer the question
In order to leave comments, you need to log in
What do "offset", "count" and "filter" mean in the VK bot code?
What do "offset", "count" and "filter" mean in the VK bot code?
The code looks like:
messages = vk_session.method("messages.getConversations", {"offset": 0, "count": 20, "filter": "unanswered"})
id = messages["items"][0]["last_message"]["from_id"]
Answer the question
In order to leave comments, you need to log in
offset - offset, that is, from which id to start doing something;
count - number;
filter - filter. Filter something by the given parameters;
Example (pseudocode):
We have 100 messages, id of which is from 1 to 100.
print(messages({"offset":10,"count":20})) - Print 20 messages, starting from id 10.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question