fix TS2454: Variable exampleName is used before being assigned
Deploy service tg-bot / service tg-bot (push) Successful in 1m30s
Deploy service tg-bot / service tg-bot (push) Successful in 1m30s
This commit is contained in:
@@ -94,8 +94,8 @@ export async function newQRCodeConversation(
|
||||
case "restaurant_table":
|
||||
exampleName = "Столик №12";
|
||||
break;
|
||||
case "other":
|
||||
exampleName = "Что-то другое";
|
||||
default:
|
||||
exampleName = "";
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -108,10 +108,10 @@ export async function newQRCodeConversation(
|
||||
);
|
||||
}
|
||||
|
||||
const exampleText = exampleName ? ` (например: «${exampleName}»)` : "";
|
||||
|
||||
// Отправляем сообщение пользователю с примером
|
||||
await ctx.reply(
|
||||
`Введите название для вашего QR-кода (например: «${exampleName}»):`,
|
||||
);
|
||||
await ctx.reply(`Введите название для вашего QR-кода${exampleText}:`);
|
||||
|
||||
const nameMsg = await conversation.waitFor("message:text");
|
||||
const name = nameMsg.message.text.trim();
|
||||
|
||||
Reference in New Issue
Block a user