mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 08:03:30 +01:00
feat(guide): update member fetch errors (#11374)
* feat(guide): update member fetch errors * member count is no longer relevant, since the timeout resets on each chunk * add link to the dev portal on members didn't arrive in time * add section about opcode 8 gateway rate limit resolves #11245 #11277 * chore: add missing period on list item --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -189,12 +189,18 @@ This error originates from an invalid call to `bulkDelete()`. Make sure you are
|
|||||||
|
|
||||||
This error happens when fetching multiple members via `GuildMemberManager#fetch()` and:
|
This error happens when fetching multiple members via `GuildMemberManager#fetch()` and:
|
||||||
|
|
||||||
- The `GuildMembers` intent is not specified or enabled in the dev dashboard
|
- The `GuildMembers` intent is not specified or enabled in the [developer portal](https://discord.com/developers/applications).
|
||||||
- The internet connection is somewhat bad
|
- The internet connection is somewhat bad.
|
||||||
- The amount of members fetched is large (about 50 thousand and upwards)
|
|
||||||
|
|
||||||
You can specify the time to wait for with the `time` option in the `.fetch()` call. Another solution could be to move your bot to a faster infrastructure, if available.
|
You can specify the time to wait for with the `time` option in the `.fetch()` call. Another solution could be to move your bot to a faster infrastructure, if available.
|
||||||
|
|
||||||
|
### Request with opcode 8 was rate limited.
|
||||||
|
|
||||||
|
You are requesting all guild members too frequently on the same guild.
|
||||||
|
|
||||||
|
- Look for instances of `GuildMemberManager#fetch()` that do not specify users.
|
||||||
|
- Make sure to handle the returned promise gracefully. Discord may change the exact values of this rate limit in the future. You can find all relevant details in the caught error.
|
||||||
|
|
||||||
### MaxListenersExceededWarning: Possible EventEmitter memory leak detected...
|
### MaxListenersExceededWarning: Possible EventEmitter memory leak detected...
|
||||||
|
|
||||||
This error is caused by spawning a large number of event listeners, usually for the client. The most common cause of this is nesting your event listeners instead of separating them. The way to fix this error is to make sure you do not nest your listeners; it is **not** to use `emitter.setMaxListeners()` as the error suggests.
|
This error is caused by spawning a large number of event listeners, usually for the client. The most common cause of this is nesting your event listeners instead of separating them. The way to fix this error is to make sure you do not nest your listeners; it is **not** to use `emitter.setMaxListeners()` as the error suggests.
|
||||||
|
|||||||
Reference in New Issue
Block a user