фикс меню по команде /start
This commit is contained in:
parent
8fc2d7296d
commit
a42a12cff4
21
Program.cs
21
Program.cs
@ -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))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user