Пофиксил падение бота в случае, если не получается скачать скрин камеры

This commit is contained in:
ftc
2023-12-23 11:23:57 +03:00
parent 42482730f5
commit 1d73b4d8be
+2 -2
View File
@@ -61,7 +61,7 @@ namespace ZaoBot
{ {
try try
{ {
SendCameraImage(e.Message.Chat, cam); await SendCameraImage(e.Message.Chat, cam);
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -90,7 +90,7 @@ namespace ZaoBot
return this; return this;
} }
private async void SendCameraImage(Telegram.Bot.Types.Chat chat, CameraConfigData cam) private async Task SendCameraImage(Telegram.Bot.Types.Chat chat, CameraConfigData cam)
{ {
using (WebClient client = new WebClient()) using (WebClient client = new WebClient())
{ {