add exampleNames
Deploy app frontend / app frontend (push) Successful in 1m52s
Deploy service couchdb / service couchdb (push) Successful in 27s
Deploy db-migrations / db-migrations (push) Successful in 1m23s
Deploy service message-delivery-method-web-push / service message-delivery-method-web-push (push) Successful in 1m18s
Deploy service tg-bot / service tg-bot (push) Successful in 1m16s
Deploy app frontend / app frontend (push) Successful in 1m52s
Deploy service couchdb / service couchdb (push) Successful in 27s
Deploy db-migrations / db-migrations (push) Successful in 1m23s
Deploy service message-delivery-method-web-push / service message-delivery-method-web-push (push) Successful in 1m18s
Deploy service tg-bot / service tg-bot (push) Successful in 1m16s
This commit is contained in:
@@ -53,9 +53,34 @@ export async function newQRCodeConversation(
|
||||
await placementChoice.answerCallbackQuery({ text: "Объект выбран!" });
|
||||
|
||||
// 2. Ввод названия QR-кода
|
||||
let exampleName: string;
|
||||
|
||||
switch (typedPlacement) {
|
||||
case "car":
|
||||
exampleName = "Моя машина";
|
||||
break;
|
||||
case "pet":
|
||||
exampleName = "Ошейник Барсика";
|
||||
break;
|
||||
case "door":
|
||||
exampleName = "Входная дверь квартиры";
|
||||
break;
|
||||
case "store":
|
||||
exampleName = "Магазин на углу";
|
||||
break;
|
||||
case "restaurant_table":
|
||||
exampleName = "Столик №12";
|
||||
break;
|
||||
case "other":
|
||||
exampleName = "Что-то другое";
|
||||
break;
|
||||
}
|
||||
|
||||
// Отправляем сообщение пользователю с примером
|
||||
await ctx.reply(
|
||||
"Введите название для вашего QR-кода (например: 'Моя машина'):",
|
||||
`Введите название для вашего QR-кода (например: «${exampleName}»):`,
|
||||
);
|
||||
|
||||
const nameMsg = await conversation.waitFor("message:text");
|
||||
const name = nameMsg.message.text.trim();
|
||||
if (name.length < 2) {
|
||||
|
||||
Reference in New Issue
Block a user