V
V
Vlad Tanashchuk2020-07-03 16:43:06
Python
Vlad Tanashchuk, 2020-07-03 16:43:06

How to get bot message ID VK_API?

Method:

vk.method("messages.send", {"peer_id": event.obj["peer_id"], "message": "", "random_id": 0})

I saw that, upon successful execution, messages.send should return message ids, but this does not happen for me, although I did everything as in the method, can you tell me what the problem is?
5eff35e240718045606536.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
soremix, 2020-07-03
@SoreMix

What does he return?

print(vk.method("messages.send", {"peer_id": event.obj["peer_id"], "message": "", "random_id": 0}))

S
Saraman, 2020-07-03
@Saraman

Returns everything, just give it to some variable.

G
Guerro69, 2020-07-03
@Guerro69

From the bot side, you can only get the message_conversation_id, from which the tocl is the same as from the returned id of the regular message from the bot side, and the normal id can be received safely if your bot is on the page.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question