feat: respond to chat if error
This commit is contained in:
parent
35b42cc819
commit
7b33a8043b
@ -53,7 +53,10 @@ public static class CommandRegister
|
|||||||
|
|
||||||
var videoPath = autoScanApp.GetVideoPath(photoMessage.Caption);
|
var videoPath = autoScanApp.GetVideoPath(photoMessage.Caption);
|
||||||
if (string.IsNullOrEmpty(videoPath))
|
if (string.IsNullOrEmpty(videoPath))
|
||||||
|
{
|
||||||
|
await botHandler.SendText(msg.Chat.Id, "No video found for this image");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
await botHandler.SendVideo(msg.Chat.Id, videoPath);
|
await botHandler.SendVideo(msg.Chat.Id, videoPath);
|
||||||
};
|
};
|
||||||
@ -69,10 +72,10 @@ public static class CommandRegister
|
|||||||
var images = autoScanApp.GetLastScanPictures();
|
var images = autoScanApp.GetLastScanPictures();
|
||||||
if (images.Length == 0)
|
if (images.Length == 0)
|
||||||
{
|
{
|
||||||
await botHandler.Update("No images found");
|
await botHandler.UpdateText("No images found");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await botHandler.Update($"Scan completed, found {images.Length} images");
|
await botHandler.UpdateText($"Scan completed, found {images.Length} images");
|
||||||
await botHandler.UpdatePhotos(images);
|
await botHandler.UpdatePhotos(images);
|
||||||
}catch(Exception ex)
|
}catch(Exception ex)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user