Add default ratelimit callback (#2037)

This commit is contained in:
Quin Lynch
2022-01-14 07:55:57 -04:00
committed by GitHub
parent 3429cf99c8
commit 4d9389b3aa
8 changed files with 27 additions and 13 deletions

View File

@@ -1,4 +1,6 @@
using System;
using System.Reflection;
using System.Threading.Tasks;
namespace Discord
{
@@ -131,6 +133,14 @@ namespace Discord
/// </returns>
public RetryMode DefaultRetryMode { get; set; } = RetryMode.AlwaysRetry;
/// <summary>
/// Gets or sets the default callback for ratelimits.
/// </summary>
/// <remarks>
/// This property is mutually exclusive with <see cref="RequestOptions.RatelimitCallback"/>.
/// </remarks>
public Func<IRateLimitInfo, Task> DefaultRatelimitCallback { get; set; }
/// <summary>
/// Gets or sets the minimum log level severity that will be sent to the Log event.
/// </summary>