if (req[0].site == '1') {
link = await bot.telegram.getFileLink(ctx.message.photo[ctx.message.photo.length - 1].file_id) // Save the last image
await console.log(link.href) // Print the last image url to know it's the good
await db.query(`UPDATE base SET photo = '${link.href} \n ${req[0].photo} ' where user = '${ctx.chat.id}'`) // To add to the database, but it's only save the last sended picture
return;
}
I try to know where was the problem, change my db query but it's not that, check if all of my code is in await and it's good