Naltox / telegram-node-bot

Node module for creating Telegram bots.
MIT License
720 stars 144 forks source link

tg.api.sendMessage() sends same message times the amount of workers defined in Telegram constructor #193

Open laurynas-karvelis opened 6 years ago

laurynas-karvelis commented 6 years ago

Hi, thank you for an awesome API implementation. I began using your module and found unwanted behaviour with tg.api.sendMessage method. Basically, tg.api.sendMessage() sends same message (number of workers + 1) times. I.e. if you set number of workers in constructor to 1, it uses 1 worker, but sends the message twice, with my i7 CPU that has 8 cores, by not passing workers value into constructor at all, tg.api.sendMessage will send same message 9 times!

Sending message from routed controller sends only 1 message as intended. It would be awesome if this could be fixed in the near future.

Thank you!