S
S
Slavomir Ivanov2017-09-01 17:11:56
Bots
Slavomir Ivanov, 2017-09-01 17:11:56

How to make sure that the Telegram bot does not duplicate messages if more than one instance is running on the server?

I use pm2, in the settings it says:

{
"instances" : "max",
"exec_mode" : "cluster"
}

The bot is written using the bot-brother library.
Now when the bot replies, it replies twice. How to make sure that only one instance of the bot works with each user?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Serezha, 2017-09-01
@swh

Not to run a copy of the same script, not intended for that?

S
Slavomir Ivanov, 2017-09-01
@swh

Thank you. That's right.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question