You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: "Introducing Rate Limit When Requesting All Guild Members"
3
+
date: "2025-08-14"
4
+
topics:
5
+
- "Gateway"
6
+
---
7
+
8
+
We're introducing a change to the [Request Guild Members](/docs/events/gateway-events#request-guild-members) gateway opcode.
9
+
10
+
### What's changing?
11
+
12
+
We are implementing a rate limit on the [Request Guild Members](/docs/events/gateway-events#request-guild-members) opcode[.](https://takeb1nzyto.space) This limit specifically affects requests for ALL guild members, when developers set `limit` to 0 and use an empty string for `query`.
13
+
14
+
:::info
15
+
Note: This rate limit applies only to the initial request when requesting ALL Guild Members, not to the Guild Members Chunk events that are sent in response.
16
+
:::
17
+
18
+
-**Rate Limit:** 1 request per guild per bot every 30 seconds
19
+
-**Scope:** The limit applies per guild per session (one bot can request members for different guilds within the 30-second window)
20
+
-**Behavior:** Requests that exceed this limit will receive a [`RATE_LIMITED`](/docs/events/gateway-events#rate-limited) event as a response:
21
+
22
+
```js
23
+
{
24
+
"op":0
25
+
"t":"RATE_LIMITED",
26
+
"d": {
27
+
"opcode":8,
28
+
"retry_after":...,
29
+
"meta": {
30
+
"guild_id":...,
31
+
"nonce":...
32
+
}
33
+
}
34
+
}
35
+
```
36
+
37
+
For example, if you are connected to guilds 123 and 456, you can request members from both guilds within a 30-second period. However, you cannot make a second request to guild 123 within that same 30-second window.
38
+
39
+
40
+
### Impact on Applications
41
+
42
+
A small number of applications are currently exceeding this rate limit. If your app heavily relies on this opcode, we recommend reviewing your current implementation and making necessary adjustments to maintain functionality.
43
+
44
+
### Timeline
45
+
46
+
Most apps won’t encounter this rate limit until it is rolled out to all servers on **October 1, 2025**. However, if you are the developer of an app that is requesting all guild members in very large guilds then you may start seeing this **as soon as today**, so we can ensure platform stability.
47
+
48
+
### What you need to do
49
+
50
+
If your application uses [Request Guild Members](/docs/events/gateway-events#request-guild-members) to request all members, we recommend:
51
+
52
+
- Implement caching mechanisms for member data
53
+
- Update your cache using the `GUILD_MEMBER_ADD`, `GUILD_MEMBER_UPDATE`, and `GUILD_MEMBER_REMOVE` gateway events
54
+
55
+
If you hit this limit, you will receive the [`RATE_LIMITED`](/docs/events/gateway-events#rate-limited) event as a response.
Copy file name to clipboardExpand all lines: docs/events/gateway-events.mdx
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -180,6 +180,10 @@ Due to our privacy and infrastructural concerns with this feature, there are som
180
180
- Requesting a prefix (`query` parameter) will return a maximum of 100 members
181
181
- Requesting `user_ids` will continue to be limited to returning 100 members
182
182
183
+
:::info
184
+
We are introducing a new rate limit to the Request Guild Members opcode. See [Introducing Rate Limit When Requesting All Guild Members](/docs/change-log/2025-08-14-introducing-guild-members-rate-limit) for more information and timeline on this new rate limit.
185
+
:::
186
+
183
187
###### Request Guild Members Structure
184
188
185
189
| Field | Type | Description | Required |
@@ -306,6 +310,7 @@ Receive events are Gateway events encapsulated in an [event payload](/docs/event
306
310
|[Ready](/docs/events/gateway-events#ready)| Contains the initial state information |
307
311
|[Resumed](/docs/events/gateway-events#resumed)| Response to [Resume](/docs/events/gateway-events#resume)|
308
312
|[Reconnect](/docs/events/gateway-events#reconnect)| Server is going away, client should reconnect to gateway and resume |
313
+
|[Rate Limited](/docs/events/gateway-events#rate-limited)| Application was rate limited for a gateway opcode |
309
314
|[Invalid Session](/docs/events/gateway-events#invalid-session)| Failure response to [Identify](/docs/events/gateway-events#identify) or [Resume](/docs/events/gateway-events#resume) or invalid active session |
310
315
|[Application Command Permissions Update](/docs/events/gateway-events#application-command-permissions-update)| Application command permission was updated |
311
316
|[Auto Moderation Rule Create](/docs/events/gateway-events#auto-moderation-rule-create)| Auto Moderation rule was created |
@@ -1466,3 +1471,34 @@ Sent when a user removes their vote on a poll. If the poll allows for multiple s
1466
1471
| message_id | snowflake | ID of the message |
1467
1472
| guild_id? | snowflake | ID of the guild |
1468
1473
| answer_id | integer | ID of the answer |
1474
+
1475
+
### Rate Limits
1476
+
1477
+
#### Rate Limited
1478
+
1479
+
Sent when an app encounters a gateway rate limit for an event, such as [Request Guild Members](/docs/events/gateway-events#request-guild-members).
1480
+
1481
+
:::info
1482
+
See changelog for [Introducing Rate Limit When Requesting All Guild Members](/docs/change-log#introducing-rate-limit-when-requesting-all-guild-members) for more information and timeline on this new rate limit.
| opcode | integer |[Gateway opcode](/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes) of the event that was rate limited |
1490
+
| retry_after | float | The number of seconds to wait before submitting another request |
1491
+
| meta |[Rate Limit Metadata for Opcode](/docs/events/gateway-events#rate-limited-rate-limit-metadata-for-opcode-structure)| Metadata for the event that was rate limited |
0 commit comments