fix: Different ratelimits for the same route (implement discord buckets) (#1546)
* Don't disable when there's no resetTick Sometimes Discord won't send any ratelimit headers, disabling the semaphore for endpoints that should have them. * Undo changes and change comment * Add HttpMethod to BucketIds * Add X-RateLimit-Bucket * BucketId changes - BucketId is it's own class now - Add WebhookId as a major parameter - Add shared buckets using the hash and major parameters * Add webhookId to BucketIds * Update BucketId and redirect requests * General bugfixes * Assign semaphore and follow the same standard as Reset for ResetAfter
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Discord.Net;
|
||||
using System.Threading;
|
||||
|
||||
namespace Discord
|
||||
@@ -57,7 +58,7 @@ namespace Discord
|
||||
public bool? UseSystemClock { get; set; }
|
||||
|
||||
internal bool IgnoreState { get; set; }
|
||||
internal string BucketId { get; set; }
|
||||
internal BucketId BucketId { get; set; }
|
||||
internal bool IsClientBucket { get; set; }
|
||||
internal bool IsReactionBucket { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user