Add admin order duplication to @RomanDoro

This commit is contained in:
RomanDoroshenko 2026-10-06 11:34:44 +00:00
parent 71f7d5d287
commit d642378226
2 changed files with 19 additions and 1 deletions

7
bot.js
View File

@ -171,6 +171,13 @@ case 'await_quantity': {
inline_keyboard: [[{ text: 'Оплатить', url: 'https://kaspi.me/pay/87016789719' }]],
},
});
// Дублировать заказ администратору @RomanDoro
try {
const adminChat = await bot.api.getChat('@RomanDoro');
await bot.api.sendMessage(adminChat.id, `📩 Дубликат заказа:\n${formatOrder(order)}`);
} catch (e) {
console.error('Не удалось отправить дубликат администратору:', e);
}
reset(chatId);
break;
}

View File

@ -1 +1,12 @@
[]
[
{
"id": 1791286408137,
"type": "коробка",
"quantity": 1,
"date": "2026-10-07",
"time": "11:00",
"name": "Роман",
"phone": "87059631941",
"total": 3000
}
]