фикс меню по команде /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")
|
||||
{
|
||||
var keyboard = new InlineKeyboardMarkup(new[]
|
||||
if (message.Text == "/start")
|
||||
{
|
||||
new[]
|
||||
{
|
||||
InlineKeyboardButton.WithCallbackData("📝 Подать заявку", "report"),
|
||||
InlineKeyboardButton.WithCallbackData("🔐 Панель администратора", "admin_panel")
|
||||
await SendMainMenu(botClient, message.Chat.Id);
|
||||
Log.Information($"Ответ на команду /start с кнопками отправлен.");
|
||||
}
|
||||
});
|
||||
|
||||
await botClient.SendMessage(
|
||||
chatId: message.Chat.Id,
|
||||
text: "Привет! Я бот для сбора заявок на ремонт оборудования.",
|
||||
replyMarkup: keyboard
|
||||
);
|
||||
Log.Information($"Ответ на команду /start с кнопками отправлен.");
|
||||
}
|
||||
|
||||
else if (usersWaitingForReport.TryGetValue(message.Chat.Id, out bool isWaiting) && isWaiting)
|
||||
else if (usersWaitingForReport.TryGetValue(message.Chat.Id, out bool isWaiting) && isWaiting)
|
||||
{
|
||||
if (userReportSteps.TryGetValue(message.Chat.Id, out int step))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user