function sendDocumentByQuery(chatId,query)
  {  
db.select().from('document').where(query).orderBy('id','asc').limit(10).then(documents => {    
   const html_text=
documents.map((f,i) =>{
      return `<b>${i+1}</b> ${f.name_document} ${
        item.files 
        ? item.files.split('.').pop()==='zip' 
             ? <a href={item.files}><img src="zip.png" width="30" height="30" alt="pdf" /></a>
             : <a href={item.files}><img src="pdf3.png" width="30" height="30" alt="pdf" /></a>
             : ''
       }`
    }).join('\n')      
  bot.sendMessage(chatId,html_text, {
    parse_mode: 'HTML'
  })