Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intents causing cache-reliant features to fail #941

Open
Skillz4Killz opened this issue May 6, 2020 · 2 comments
Open

Intents causing cache-reliant features to fail #941

Skillz4Killz opened this issue May 6, 2020 · 2 comments

Comments

@Skillz4Killz
Copy link
Contributor

Enabling intents mode makes it very difficult to keep using getAllMembers. Even a small bot of my size was having a 5x increase in bootup time. This made using getAllMembers essentially dead when enabling intents, as updating a bot or simply restarting would take too long.

Reason: Discord made it impossible to fetch members from multiple guilds at the same time meaning we now need to fetch 1 guild at a time.

Issue: Without the getAllMembers, the member cache is no longer filled meaning any events triggered on guildMemberUpdate will no longer be able to properly identify what changes were made. For example, there is no way to tell what role was added or removed. There is no way to tell what nickname was changed from. You will only get the current status.

I believe this also potentially effects guildMemberRemove as well. For example, when a member leaves but they were not cached this only sends a basic user object as opposed to a member. Imagine you had a feature keep a history of what roles a member had so that when they rejoined they would stay muted or keep whatever roles they had as opposed to bypassing server setups by just leaving and rejoining.

After discussion with Discord developers, they stated that they don't mind if we cache as much as we want but they just don't want us fetching members every time we startup. This means a system with something like Redis serving as a persistant cache for members is necessary for any bots using intents.

Milestone: v1.0 rewrite

@abalabahaha abalabahaha changed the title GuildMemberUpdate & GuildMemberRemove Potentially Broken With Intents Change Intents causing cache-reliant features to fail May 12, 2020
@Explooosion-code
Copy link

With about 30k members in my discord the boot time was over 6h.

@bsian03
Copy link
Collaborator

bsian03 commented Apr 27, 2021

Yes, that was made clear in the OPs description. Also, see linked issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants