Skip to content

feat: add verified role auto-grant cog#6

Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1770879525-verified-role-cog
Open

feat: add verified role auto-grant cog#6
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1770879525-verified-role-cog

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Feb 12, 2026

feat: add verified role auto-grant cog

Summary

Adds a new Verified cog that automatically grants the Verified role whenever Logistics or Problem Writing is added to a member. Includes:

  • on_member_update listener that detects trigger role additions, grants Verified, and looks up the audit log to identify who added the role
  • Logs all grants to <#1471399531580100670> with member mention, trigger role name, and moderator info
  • Hourly periodic sync loop that catches any members who have a trigger role but are missing Verified
  • Enables intents.members (privileged intent) on the bot

Review & Testing Checklist for Human

  • Privileged intent: intents.members = True requires the "Server Members Intent" toggle to be enabled in the Discord Developer Portal. If not already on, the bot will fail to connect after this change.
  • Audit log attribute access: entry.changes.after.roles on line 63 may raise AttributeError if entry.changes.after is None or lacks a .roles attribute — the surrounding try/except only catches discord.Forbidden and discord.HTTPException, not AttributeError. Worth verifying against the discord.py docs or testing live.
  • Verify hardcoded values: Confirm channel ID 1471399531580100670 and role names "Verified", "Logistics", "Problem Writing" match the actual server configuration exactly (case-sensitive).
  • Live test: Deploy to a test environment or staging bot, add Logistics/Problem Writing to a member, and confirm (a) Verified is granted, (b) log message appears in the channel with correct moderator attribution, (c) periodic sync catches existing members missing Verified.

Notes


Open with Devin

Co-Authored-By: Oliver Ni <oliver.ni@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Contributor Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 5 additional findings.

Open in Devin Review

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.

0 participants