фикс багов
This commit is contained in:
parent
6939a665e5
commit
eec1c79714
13
Program.cs
13
Program.cs
@ -122,7 +122,6 @@ class Program
|
||||
{
|
||||
await botClient.AnswerCallbackQuery(callbackQuery.Id); // Убираем "часики" у кнопки
|
||||
}
|
||||
// Убираем "часики" у кнопки
|
||||
|
||||
if (data == "report")
|
||||
{
|
||||
@ -151,7 +150,6 @@ class Program
|
||||
await ShowReportDetails(botClient, chatId, reportId, messageId);
|
||||
}
|
||||
}
|
||||
|
||||
else if (data != null && data.StartsWith("status_"))
|
||||
{
|
||||
string[] parts = data.Split('_');
|
||||
@ -164,8 +162,6 @@ class Program
|
||||
await ShowReportDetails(botClient, chatId, reportId, messageId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
else if (data == "back_to_list")
|
||||
{
|
||||
await ViewReports(botClient, chatId);
|
||||
@ -178,9 +174,8 @@ class Program
|
||||
}
|
||||
|
||||
// Обработка текстовых сообщений
|
||||
if (update.Type != UpdateType.Message || update.Message?.Text == null)
|
||||
return;
|
||||
|
||||
if (update.Type == UpdateType.Message && update.Message?.Text != null)
|
||||
{
|
||||
var message = update.Message;
|
||||
Log.Information($"Получено сообщение от {message.Chat.Id}: {message.Text}");
|
||||
|
||||
@ -243,7 +238,8 @@ class Program
|
||||
}
|
||||
else
|
||||
{
|
||||
await botClient.SendMessage(chatId: message.Chat.Id, text: "ℹ️ Используйте кнопки для навигации.");
|
||||
await botClient.SendMessage(chatId: message.Chat.Id, text: "ℹ️ Используйте команду /start для начала работы с ботом.");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -254,6 +250,7 @@ class Program
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static async Task SendMainMenu(ITelegramBotClient botClient, long chatId)
|
||||
{
|
||||
var keyboard = new InlineKeyboardMarkup(new[]
|
||||
|
Loading…
x
Reference in New Issue
Block a user