request("https://api.telegram.org/bot"+TOKEN+"/getFile?file_id=" + file_id, { json: true }, (err, res, body) => {
if (err) { return console.log(err); }
console.log(body.result.file_path);
full = "https://api.telegram.org/file/bot"+TOKEN+"/" + body.result.file_path;
console.log (full);
const file = fs.createWriteStream("file.ogg");
const request = https.get(full, function(response) {
response.pipe(file)
})
});
});