From b0d12683faf698f8d7856dc806b164ec754fa1f7 Mon Sep 17 00:00:00 2001 From: MrPowerGamerBR <9496359+MrPowerGamerBR@users.noreply.github.com> Date: Tue, 13 Jun 2023 13:00:35 -0300 Subject: [PATCH] Use different bucket if it is a PATCH request I'm still not 100% sure if this is how Discord's rate limits for this patch really works because rate limits are very confusing to me, but I'm like, 99% sure --- lib/bucketpath.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bucketpath.go b/lib/bucketpath.go index 9a0062c..fb57446 100644 --- a/lib/bucketpath.go +++ b/lib/bucketpath.go @@ -89,7 +89,7 @@ func GetOptimisticBucketPath(url string, method string) string { // ! stands for any replaceable id switch parts[0] { case MajorChannels: - if numParts == 2 { + if numParts == 2 && method != "PATCH" { // Return the same bucket for all reqs to /channels/id // In this case, the discord bucket is the same regardless of the id bucket.WriteString(MajorChannels) @@ -196,4 +196,4 @@ func GetOptimisticBucketPath(url string, method string) string { } return bucket.String() -} \ No newline at end of file +}