feat: respond to chat if error

This commit is contained in:
Guillermo Marcel 2025-03-29 11:08:03 -03:00
parent 35b42cc819
commit 7b33a8043b

View File

@ -53,7 +53,10 @@ public static class CommandRegister
var videoPath = autoScanApp.GetVideoPath(photoMessage.Caption);
if (string.IsNullOrEmpty(videoPath))
{
await botHandler.SendText(msg.Chat.Id, "No video found for this image");
return;
}
await botHandler.SendVideo(msg.Chat.Id, videoPath);
};
@ -69,10 +72,10 @@ public static class CommandRegister
var images = autoScanApp.GetLastScanPictures();
if (images.Length == 0)
{
await botHandler.Update("No images found");
await botHandler.UpdateText("No images found");
return;
}
await botHandler.Update($"Scan completed, found {images.Length} images");
await botHandler.UpdateText($"Scan completed, found {images.Length} images");
await botHandler.UpdatePhotos(images);
}catch(Exception ex)
{