refactor: simplify codebase with unified patterns and reduced duplication

- unify ChatConfigService setters into generic setPermission method
- replace PermissionService switch statements with data-driven checkers map
- deduplicate config.ts callback handlers via loop-based registration (414→254 lines)
- extract shared updateChatCommands utility from role-add/role-delete
- add proper generics to chunk utility, fix mention loop indexing
- extract isHiddenAdmin helper and ANONYMOUS_ADMIN_ID constant in perms
- remove debug console.logs, standardize arrow exports and type imports
- add roleAdminPermission schema and migration
This commit is contained in:
devilreef 2026-02-17 21:27:35 +06:00
parent 1eb2200fbe
commit 85c7410ffb
21 changed files with 638 additions and 364 deletions

View file

@ -15,6 +15,13 @@
"when": 1764313289570,
"tag": "0001_legal_blob",
"breakpoints": true
},
{
"idx": 2,
"version": "7",
"when": 1765468835132,
"tag": "0002_bored_stephen_strange",
"breakpoints": true
}
]
}