Answer the question
In order to leave comments, you need to log in
How to find the sender id in node-vk-bot-api?
Hi all. The other day I dug up this library and decided to write a bot while studying node js
https://github.com/node-vk-bot-api/node-vk-bot-api
Everything seems to be fine, but I don’t know how to find out the message sender ID for further actions with id.
Answer the question
In order to leave comments, you need to log in
If your bot works on commands, then paste the following code and see the keys and their values. Perhaps there will be keys by type: senderId, user_id, etc.
bot.command('/start', async (ctx) => {
console.log(ctx)
});
const user_id = ctx.senderId
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question