improved readability

This commit is contained in:
Florian Zevedei 2023-12-07 17:49:35 +01:00
parent 89332244e3
commit 794dee7f58

View File

@ -199,9 +199,10 @@ public class MessageClient
if (eventHandlers != null) if (eventHandlers != null)
{ {
await eventHandlers; await eventHandlers;
return;
} }
else
{ //Fallback when no event handler is used.
if (update.Exception is ApiRequestException exApi) if (update.Exception is ApiRequestException exApi)
{ {
Console.WriteLine($"Telegram API Error:\n[{exApi.ErrorCode}]\n{exApi.Message}"); Console.WriteLine($"Telegram API Error:\n[{exApi.ErrorCode}]\n{exApi.Message}");
@ -210,7 +211,7 @@ public class MessageClient
{ {
Console.WriteLine(update.Exception.ToString()); Console.WriteLine(update.Exception.ToString());
} }
}
} }
#endregion #endregion