R
R
Rusiantvso2021-02-26 20:11:41
API
Rusiantvso, 2021-02-26 20:11:41

How to find out the ID of a person in VK by answering a message?

upd: solved the problem

if text.lower() == 'твой айди':
    vk.messages.send(
                        chat_id=event.chat_id,
                        reply_message=reply_message,
                        message = 'Айди пользователя ' + str(reply_message) + '.' ,
                        random_id=get_random_id()
                    )

Thank you for the name of the object

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex K, 2021-02-26
@Rusiantvso

For the `message_new` event (incoming message), a message object comes from the VC . This object has the properties `reply_message` (the object of the message that the current message was sent in response to), as well as `from_id` (the ID of the sender of the current message).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question