Files
aurorabot/shared/modules/feature-flags/AGENTS.md
syntaxbullet 6abbd4652a
Some checks failed
Deploy to Production / test (push) Failing after 33s
Refresh repository documentation
- Rewrite AGENTS and README files to match the current app layout
- Document API routes, trivia UI, and the active panel design language
2026-04-09 21:10:10 +02:00

749 B

Feature flags module

Behavior

  • no in-memory caching; each check reads from the database
  • a flag must exist and be globally enabled before any access grant matters
  • grants can target a guild, a user, or a role

Main entrypoints

  • isFlagEnabled(flagName)
  • hasAccess(flagName, { guildId, userId, memberRoles })
  • createFlag(name, description?)
  • setFlagEnabled(name, enabled)
  • grantAccess(flagName, { guildId?, userId?, roleId? })
  • revokeAccess(accessId)
  • listFlags()
  • listAccess(flagName)
  • deleteFlag(name)

Command integration

  • bot/lib/handlers/CommandHandler.ts checks beta commands through this service
  • if a command does not set featureFlag, the slash command name is used as the fallback flag name