=> { 
                      
                      
                       
                      
                      
                          var path = bot.downloadFile(msg.audio[msg.audio.length-1].file_id, ".").filePath; 
                      
                      
                          console.log(path); 
                      
                      
                      const chatId = msg.chat.id; 
                      
                      
                      bot.sendMessage(chatId, 'Received your audio ${path}'); 
                      
                      
                      }); 
                      
                      
                      bot.on('message', (msg) => { 
                      
                      
                        const chatId = msg.chat.id; 
                      
                      
                       
                      
                      
                        // send a message to the chat acknowledging receipt of their message 
                      
                      
                        bot.sendMessage(chatId, 'Received your message'); 
                      
                      
                      });```
                      
                      
                    
module: node-telegram-bot-api
bot.on("polling_error", (msg) => console.log(msg));
Обсуждают сегодня