From 5eafc06a7fa76208bfcde84e1504bd67130e08ca Mon Sep 17 00:00:00 2001 From: RomanDoroshenko Date: Tue, 6 Oct 2026 12:01:27 +0000 Subject: [PATCH] Show all product images after greeting --- bot.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bot.js b/bot.js index b42ca92..8111483 100644 --- a/bot.js +++ b/bot.js @@ -71,9 +71,11 @@ function formatOrder(order) { // --- Хэндлеры --- bot.command('start', async (ctx) => { await ctx.reply('Привет! Я ваш виртуальный продавец зефирных цветов.'); - // Отправляем одну картинку товара - const filePath = path.join(__dirname, images[0]); - await ctx.replyWithPhoto(new InputFile(filePath), { caption: 'Зефирный букет' }).catch(() => {}); + // Отправляем все варианты товара + for (let i = 0; i < images.length; i++) { + const filePath = path.join(__dirname, images[i]); + await ctx.replyWithPhoto(new InputFile(filePath), { caption: `Вариант ${i + 1}` }).catch(() => {}); + } // Кнопки выбора типа продукта await ctx.reply('Какой вариант вас интересует?', { reply_markup: {