G
G
Griboks2019-02-27 13:41:50
Python
Griboks, 2019-02-27 13:41:50

How to run multiple Telegram bots on the same server?

Good afternoon.
Two programs (bot and updater) are written, using the same tokens, each works if you run them in turn. If you run them at the same time, one loses connection with the telegram servers.
Please tell me how to solve this problem. Select different tokens or different ip? Maybe you need to specify a special parameter?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2019-03-08
@Griboks

1) Does the bot use the telegram bot api or does it work as a telegram client?
Most likely the first.
2) Does he use webhook or long pooling?
Maybe not so important, but the solution will be different.
Just taking and running 2 bots with the same bot api token will not work: you cannot enable 2 webhooks or 2 long pooling at the same time.

G
Griboks, 2019-03-08
@Griboks

The answer in two words: no way. Cart does not support simultaneous connections. But you can use the good old bicycle method and write your own (de)multiplexer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question