mirror of
https://github.com/sochix/TLSharp.git
synced 2025-12-06 08:02:00 +01:00
Exceptions from MtProtoSender.cs to TLSharp.Core/Network/Exceptions Exceptions from TelegramClient.cs to TLSharp.Core/Exceptions
16 lines
604 B
C#
16 lines
604 B
C#
using System;
|
|
|
|
namespace TLSharp.Core.Network.Exceptions
|
|
{
|
|
public class FloodException : Exception
|
|
{
|
|
public TimeSpan TimeToWait { get; private set; }
|
|
|
|
internal FloodException(TimeSpan timeToWait)
|
|
: base($"Flood prevention. Telegram now requires your program to do requests again only after {timeToWait.TotalSeconds} seconds have passed ({nameof(TimeToWait)} property)." +
|
|
" If you think the culprit of this problem may lie in TLSharp's implementation, open a Github issue please.")
|
|
{
|
|
TimeToWait = timeToWait;
|
|
}
|
|
}
|
|
} |