Add permission check for ReadMessageHistory in vote channels#7
Open
its-applekid wants to merge 3 commits intoits-everdred:mainfrom
Open
Add permission check for ReadMessageHistory in vote channels#7its-applekid wants to merge 3 commits intoits-everdred:mainfrom
its-applekid wants to merge 3 commits intoits-everdred:mainfrom
Conversation
b6c790e to
db212e3
Compare
- Grant bot explicit ReadMessageHistory permission when creating vote channels - Add runtime permission check before fetching messages from vote channels - Log clear error message when permission is missing - Prevents bot from being unable to read EasyPoll results Fixes issue where bot could create vote channels but not read poll results if category permissions didn't inherit or were overridden.
db212e3 to
4a03fb2
Compare
- Add permissionsFor mock to tracked channels - Add guild.members.me for bot permission checks - Fix EasyPoll message format to match parser expectations - Fix messages.fetch to return single message when fetching by ID - All 87 tests now passing
Bot inherits ReadMessageHistory from @everyone overwrite. No need for member-specific overwrite - that duplicates permissions. Keep runtime permission check for helpful error logging when category permissions or invite settings are misconfigured.
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.
Problem
Gary needs the
ReadMessageHistorypermission to fetch messages from vote channels and parse EasyPoll results. When this permission is missing, the bot silently fails to read poll data.Solution
Notes