fix: avoid unnecessary Discord members intent on startup - #4690
Closed
abhey-gupta wants to merge 1 commit into
Closed
fix: avoid unnecessary Discord members intent on startup#4690abhey-gupta wants to merge 1 commit into
abhey-gupta wants to merge 1 commit into
Conversation
Only request the privileged members intent when DISCORD_ALLOWED_USERS includes non-numeric entries that need username resolution. Also release the Discord token lock when startup fails so retries and restarts are not blocked by a stale lock.\n\nAdds regression tests for conditional intents and startup lock cleanup.
Contributor
|
Merged via PR #5302. Your commit was cherry-picked onto current main with authorship preserved. Added a minor test mock fix for compatibility with recent ExecApprovalView addition. Thanks @abhey-gupta! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
Numeric Discord allowlists should not require the privileged members intent. Requesting it unconditionally can leave bots offline when the intent is disabled in the Discord developer portal, even though the bot token and channel setup are otherwise correct.
Testing