I use the library meteor-telegram-bot . Now I get from the bot only the text like this:
TelegramBot.setCatchAllText(true, function(username, message) { TelegramBot.send("Markdown-flavored Message:\n" + message.text, message.chat.id, true); }); I found the code, but it takes the document, and I need it to take a photo and plus the text that the user will write.
File Acceptance Code:
TelegramBot.addListener('incoming_document', function(c, u, o) { TelegramBot.send('Got a file with ID ' + o.document.file_id, o.chat.id); var file = TelegramBot.method('getFile', { file_id: o.document.file_id }).result.file_path; TelegramBot.send('Download the file at https://api.telegram.org/file/bot' + TelegramBot.token + '/' + file, o.chat.id); }, 'document'); And I need exactly the photo.