T
T
TipoImya2020-10-15 09:23:37
JavaScript
TipoImya, 2020-10-15 09:23:37

Vk-node-bot-api. How to send a message when a bot is invited to a conversation?

I've seen this in a lot of bots before.
I wanted to do the same, digging through the entire Internet - I did not find a solution. Please explain how to do it) I would be very grateful.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Guerro69, 2020-10-15
@Guerro69

listen to the long poll and see when the message_new event type will be, then make a condition if 'action' is in event.object and then see if event.object.action.type is equal to chat_invite_user and event.object.action.member_id is equals -idYourBot

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question