P
P
Pigeon12352019-07-26 22:27:01
API
Pigeon1235, 2019-07-26 22:27:01

How to make the bot react to a word even if it is in context?

It is necessary to make the bot react not just to 1 word, for example: "Help", but even if it is in the text

Answer the question

In order to leave comments, you need to log in

3 answer(s)
C
cython, 2019-07-27
@Pigeon1235

if (response.includes("help")) {
send_response(params);
}

H
Hiccup Heddok, 2019-07-27
@Hiccup

I don't know how it is in your language, but in python you can do this:

if 'помощь' in response:
    send_message(что-то тут)

X
xmoonlight, 2019-07-27
@xmoonlight

It is necessary to make the bot react not just to 1 word, for example: "Help", but even if it is in the text
Here, I can not fit in my head: HOW ?! it was possible to make a bot for VK on node.js and ask such a question?!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question