Why it matters
Authorize by role id because names are renamable.
Practical steps
- Compare against configured role ids
- Allow guild owner as break-glass only if intended
- Fail ephemeral when unauthorized
- Re-fetch member when cache may be stale
- Document required roles in admin help
Watch out for
- Copy-pasting outdated snippets for discord role gates without re-reading current official docs.
- Shipping discord role gates to production without a staging rehearsal and a documented rollback.