嗨,我想将用户发送到我的电报机器人的文件存储到某处的远程服务器上。我该如何实施?
我尝试过的一些代码:
bot.on('document', (msg) =>{
fileID = msg.document.file_id;
const file = bot.getFile(fileID)
//Produces basic information about the file
file.then(function(result){
console.log(result)
})
//Not sure what this does but the function returns a file stream
const fileStream = bot.getFileStream(fileID);
})