Assign role to multiple members in a single API call #1492
-
Hello, I realized after making several API calls to Discord the library is waiting a bit to avoid Disocrd throwing packages to avoid overload from a single source. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Discord's API is, by nature, rate-limited to avoid abuse. Unfortunately no, there is no way to modify multiple members in a single API request. As for "waiting 2 minutes between calls", the library simply follows the ratelimit headers provided by Discord when hitting this endpoint. |
Beta Was this translation helpful? Give feedback.
-
Perhaps you should look into the new linked roles Discord feature? Unfortunately our lib doesn't have full support for it yet (afaik), however it may be of use to you through other resources |
Beta Was this translation helpful? Give feedback.
-
The library abstracts this away, so no. It'll handle ratelimits for you, so
just make the request and it'll be queued as is appropriate
…On Wed, Mar 8, 2023 at 10:59 AM eyagovbusiness ***@***.***> wrote:
Thank you for the answer, do you know if there is a way to check the
"X-RateLimit-Limit" from the optional HTTP response headers using
DSharpPlus?
—
Reply to this email directly, view it on GitHub
<#1492 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKDY45UMHZN2WYAMJEK67GDW3CUGVANCNFSM6AAAAAAVT3XTRM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Unfortunately no, and given the HTTP-required nature of it I doubt we'll have true support for it other than entities |
Beta Was this translation helpful? Give feedback.
Discord's API is, by nature, rate-limited to avoid abuse. Unfortunately no, there is no way to modify multiple members in a single API request. As for "waiting 2 minutes between calls", the library simply follows the ratelimit headers provided by Discord when hitting this endpoint.