improved readability
This commit is contained in:
parent
89332244e3
commit
794dee7f58
@ -199,18 +199,19 @@ public class MessageClient
|
||||
if (eventHandlers != null)
|
||||
{
|
||||
await eventHandlers;
|
||||
return;
|
||||
}
|
||||
|
||||
//Fallback when no event handler is used.
|
||||
if (update.Exception is ApiRequestException exApi)
|
||||
{
|
||||
Console.WriteLine($"Telegram API Error:\n[{exApi.ErrorCode}]\n{exApi.Message}");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (update.Exception is ApiRequestException exApi)
|
||||
{
|
||||
Console.WriteLine($"Telegram API Error:\n[{exApi.ErrorCode}]\n{exApi.Message}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine(update.Exception.ToString());
|
||||
}
|
||||
Console.WriteLine(update.Exception.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user