T
T
THEMOD2019-07-11 12:21:02
In contact with
THEMOD, 2019-07-11 12:21:02

How to find screen_name?

Good day! I want to get the user's screen_name. I tried via user.get but it sends undefined. I created a variable in the database, wrote down this result there, but the line was deleted.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sokolov, 2019-07-11
@THEMOD

Forgot parameterfields: "screen_name"
Try:

const [user_info] = await vk.api.users.get({ user_ids: message.senderId, fields: "screen_name" });

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question