Answer the question
In order to leave comments, you need to log in
How can I get a person's id by forwarding their message in a conversation?
This code reads any message from the user:
cmd.hear(/^(.*)$/i, async (message, bot) => {
message.user.balance += 1;
});
Answer the question
In order to leave comments, you need to log in
Depends on the implementation of the bot, the link to which you did not provide, so you can only guess.
But, probably, message
it has the same format as in the VK documentation .
In this case, it message.from_id
will contain the identifier of the sender.
If the message was forwarded, then the original will be somewhere inside the field fwd_messages
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question