Answer the question
In order to leave comments, you need to log in
How to make a reaction to joining a conversation via a link?
Made events that would respond to the entry into the conversation. An invitation through friends works and the bot responds, but not through a link.
I searched for the answer on my own, but did not find it.
My code:
vk.updates.on([ 'chat_invite_user', 'chat_invite_user_by_link' ], async (context) => {
context.send('Привет')
console.log(context)
})
Answer the question
In order to leave comments, you need to log in
the trouble with spaces
remove the indents in square brackets, except for the one after the comma
at the end, remove the indents to brackets
spaces after async, leave
it should be something like:
vk.updates.on([ 'chat_invite_user', space'chat_invite_user_by_link' ], async (context) => {
'tab'context.send('Hello')
'tab'console.log(context)
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question