Closed asajm closed 8 years ago
hi, the "getFile" method in the following controller returns "undefined". why?
tg.controller('ExampleController', ($) => { tg.for('/ex', ($) => { $.sendMessage('Send me an image!') $.waitForRequest(($) => { var photos = $.message.photo; if(photos){ photos.forEach((photo) => { console.log(tg.getFile(photo.file_id)); }) } }) }) })
this is the solution
tg.getFile(photo.file_id, (body, err) => {console.log(body)})
hi, the "getFile" method in the following controller returns "undefined". why?
tg.controller('ExampleController', ($) => { tg.for('/ex', ($) => { $.sendMessage('Send me an image!') $.waitForRequest(($) => { var photos = $.message.photo; if(photos){ photos.forEach((photo) => { console.log(tg.getFile(photo.file_id)); }) } }) }) })