Пофиксил падение бота в случае, если не получается скачать скрин камеры
This commit is contained in:
@@ -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())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user