фикс меню по команде /start

This commit is contained in:
107 2025-03-20 11:29:21 +07:00
parent 8fc2d7296d
commit a42a12cff4

View File

@ -553,26 +553,13 @@ class Program
} }
} }
if (message.Text == "/start") if (message.Text == "/start")
{
var keyboard = new InlineKeyboardMarkup(new[]
{ {
new[] await SendMainMenu(botClient, message.Chat.Id);
{ Log.Information($"Ответ на команду /start с кнопками отправлен.");
InlineKeyboardButton.WithCallbackData("📝 Подать заявку", "report"),
InlineKeyboardButton.WithCallbackData("🔐 Панель администратора", "admin_panel")
} }
});
await botClient.SendMessage( else if (usersWaitingForReport.TryGetValue(message.Chat.Id, out bool isWaiting) && isWaiting)
chatId: message.Chat.Id,
text: "Привет! Я бот для сбора заявок на ремонт оборудования.",
replyMarkup: keyboard
);
Log.Information($"Ответ на команду /start с кнопками отправлен.");
}
else if (usersWaitingForReport.TryGetValue(message.Chat.Id, out bool isWaiting) && isWaiting)
{ {
if (userReportSteps.TryGetValue(message.Chat.Id, out int step)) if (userReportSteps.TryGetValue(message.Chat.Id, out int step))
{ {