Answer the question
In order to leave comments, you need to log in
How to write an algorithm in java so that the bot would respond to 3 identical questions that are asked one after another?
I am writing a simple bot in java and aiml. When writing and running a bot in telegram, the bot does not respond to the same questions that are asked one after another. And in the console version, it reacts thanks to the REPETITIONDETECTED pattern. I do not know what it is connected with. So, you can write a separate script in java, so that after 3 identical spam messages it would notice and answer them with some phrase?
In one screenshot, the console version, where everything works.
On the other version for telegram, where nothing works.
If possible, please write the code!
Answer the question
In order to leave comments, you need to log in
Do you want him to respond differently to the same message?
Make some kind of counter that will be i++ when spamming. Attach your answer to each i (well, or other business logic). Do not forget about the reset condition (for example, if "spam" ended with a change in another phrase or by time, etc.)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question