F
F
fodiche2021-08-18 10:29:12
Python
fodiche, 2021-08-18 10:29:12

How to get a digital ID from an alphabetic user ID through a written message in a VK conversation?

it is necessary to make the bot after sending @qwerty (letter id) by the user to the chat send a digital id or receive it in a variable

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Developer, 2021-08-18
@samodum

match the letter ID with the digital one and store it in the database, and then use a simple select by name to get the digital ID

R
RINAMI, 2021-08-19
@RINAMI

The simplest function:

renmes = event.obj.messsage['text']
def getuserid():
    craetid = getting_api.utils.resolveScreenName(screen_name=renmes.split(' ')[1])['object_id']
    return craetid
    pass

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question