Skip to content

Add permission check for ReadMessageHistory in vote channels#7

Open
its-applekid wants to merge 3 commits intoits-everdred:mainfrom
its-applekid:add-message-history-permission-docs
Open

Add permission check for ReadMessageHistory in vote channels#7
its-applekid wants to merge 3 commits intoits-everdred:mainfrom
its-applekid:add-message-history-permission-docs

Conversation

@its-applekid
Copy link
Copy Markdown
Contributor

Problem

Gary needs the ReadMessageHistory permission to fetch messages from vote channels and parse EasyPoll results. When this permission is missing, the bot silently fails to read poll data.

Solution

  • Add explicit permission check before attempting to fetch messages
  • Log a clear, actionable error message when permission is missing
  • Helps diagnose configuration issues faster

Notes

  • The permission is already documented in README.md setup instructions
  • This just adds runtime validation with helpful error logging
  • No changes to bot intents needed (already has GuildMessages + MessageContent)

@its-applekid its-applekid force-pushed the add-message-history-permission-docs branch from b6c790e to db212e3 Compare March 14, 2026 17:43
- 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.
@its-applekid its-applekid force-pushed the add-message-history-permission-docs branch from db212e3 to 4a03fb2 Compare March 14, 2026 17:47
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant