Some checks failed
Deploy to Production / test (push) Failing after 33s
- Rewrite AGENTS and README files to match the current app layout - Document API routes, trivia UI, and the active panel design language
29 lines
867 B
Markdown
29 lines
867 B
Markdown
# Moderation module
|
|
|
|
## Responsibilities
|
|
|
|
- create and query moderation case records
|
|
- manage active warning state
|
|
- optionally DM warned users
|
|
- optionally auto-timeout when warning thresholds are reached
|
|
|
|
## Main methods
|
|
|
|
- `createCase()`
|
|
- `issueWarning()`
|
|
- `getCaseById()`
|
|
- `getUserCases()`
|
|
- `getUserWarnings()`
|
|
- `getUserNotes()`
|
|
- `clearCase()`
|
|
- `searchCases()`
|
|
- `getActiveWarningCount()`
|
|
|
|
## Notes
|
|
|
|
- case IDs are generated in application code as `CASE-0001`, `CASE-0002`, and so on
|
|
- warnings are the main case type that starts as `active: true`
|
|
- `issueWarning()` can DM the user and can create a follow-up timeout case when the configured threshold is hit
|
|
- the service stores moderation records; it does not generally execute Discord actions itself
|
|
- the auto-timeout path is the exception because a timeout target can be passed into `issueWarning()`
|