1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00
pyTelegramBotAPI/examples/multibot
2022-05-11 10:50:33 +05:00
..
config.py added examples of multibot 2022-05-11 10:50:33 +05:00
handlers.py added examples of multibot 2022-05-11 10:50:33 +05:00
main.py added examples of multibot 2022-05-11 10:50:33 +05:00
nginx_conf.conf added examples of multibot 2022-05-11 10:50:33 +05:00
README.MD added examples of multibot 2022-05-11 10:50:33 +05:00

You probably have seen bots which allow you to send them token of your bot and then handle updates providing some functionality for your bot.
This type of bots are called multibots. They are created using webhooks.

This is the example of simple multibot.
In order to reproduce this example you need to have domain and ssl connection.
If you have, go to config.py and specify your data.
There is also file called nginx_conf.conf, we will use nginx as proxy-server and this file is example nginx.conf file.
Make sure that server_name and port are the same in both config and nginx_conf
(nginx_conf.conf IS NOT complete, you would probably use tools like certbot to add ssl connection to it)
Also, in this example I used dictionary as tokens storage, but in production you should use database so that you can re-set webhooks in case bot restarts.