telebot
telebot copied to clipboard
Added an option to skip httpServer creation
In some scenarios, the webhook can be just one route in a bigger web server, which sets up its own node httpServer. In this case, the current implementation of Telebot will attempt to create its httpServer on the same host and port which will result in a conflict. To avoid this, a new option is added which specifies that httpServer should not be created and that bot.start() should return a promise resolving to a listener function which then should be mounted manually onto the existing httpServer.
I upvote this Pull request. I was about creating one.