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