Answer the question
In order to leave comments, you need to log in
Bot, with a trigger for a specific message in VK. how to implement?
we need a bot that will view new messages in a conversation / chat in VK, in the search for trigger words, noticing them, some signal should be given that the word was noticed,
it will not be connected to the conversation, i.e. should work with the owner's PC, analyzing the conversation / chat window,
tell me by writing, which is more convenient, how best to implement, are there similar bots?
thanks everyone
Answer the question
In order to leave comments, you need to log in
If you need to do it the way the question was posed and not otherwise, then write a javascript script that will intercept the chat window update events, or simply periodically scan the entire page and then do what you need.
You can attach your script to the site, for example, with the Custom JavaScript for Websites 2 plugin .
Previously, this is how bots for browser games were written. Yes, probably now.
You can use the app_id of applications that have access to user messages and using longpool, like bots, to read all user messages.
To solve this problem, you have two ways:
1) Use the official VKontakte API and write a bot that will receive messages from the conversation and process them on behalf of your page.
2) Use JavaScript and the Tampermonkey/Greasemonkey extension (they are the same) to embed your code on the VKontakte page, which will parse the block of messages and process them.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question