Added request retry modes
This commit is contained in:
@@ -1,11 +1,18 @@
|
||||
namespace Discord
|
||||
using System.Threading;
|
||||
|
||||
namespace Discord
|
||||
{
|
||||
public class RequestOptions
|
||||
{
|
||||
public static RequestOptions Default => new RequestOptions();
|
||||
|
||||
/// <summary> The max time, in milliseconds, to wait for this request to complete. If null, a request will not time out. If a rate limit has been triggered for this request's bucket and will not be unpaused in time, this request will fail immediately. </summary>
|
||||
/// <summary>
|
||||
/// The max time, in milliseconds, to wait for this request to complete. If null, a request will not time out.
|
||||
/// If a rate limit has been triggered for this request's bucket and will not be unpaused in time, this request will fail immediately.
|
||||
/// </summary>
|
||||
public int? Timeout { get; set; }
|
||||
public CancellationToken CancelToken { get; set; } = CancellationToken.None;
|
||||
public RetryMode? RetryMode { get; set; }
|
||||
public bool HeaderOnly { get; internal set; }
|
||||
|
||||
internal bool IgnoreState { get; set; }
|
||||
@@ -13,7 +20,7 @@
|
||||
internal bool IsClientBucket { get; set; }
|
||||
|
||||
internal static RequestOptions CreateOrClone(RequestOptions options)
|
||||
{
|
||||
{
|
||||
if (options == null)
|
||||
return new RequestOptions();
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user