Closed lukefx closed 4 years ago
Switched to a more complete library: https://github.com/yagop/node-telegram-bot-api
An example of the new functionality is in example.js
Using a trick with a middleware we're able to expose Telegram's methods directly on the Response object:
robot.respond(/totoro/, res => { const image = 'https://bit.ly/2VlEgCs' res.sendPhoto(res.envelope.room, image, { caption: 'Totoro!' }) })
Switched to a more complete library: https://github.com/yagop/node-telegram-bot-api
An example of the new functionality is in example.js
Using a trick with a middleware we're able to expose Telegram's methods directly on the Response object: