fix: resolve role selection limits, uncached message crashes, and optimize settings caching
All checks were successful
Auto Build and Push Docker Image / build (push) Successful in 19s

This commit is contained in:
sarah
2026-05-31 21:18:13 +02:00
parent e2018be4c6
commit 0e1630f80b
10 changed files with 33 additions and 25 deletions

View File

@@ -144,3 +144,6 @@ if (process.env.AUTO_DEPLOY !== 'false') {
2. **Foreign Keys:** Always enable `foreign_keys = ON` to maintain data integrity.
3. **Type Safety:** Use `ExtendedClient` instead of `any` for the client instance.
4. **Webhook Reuse:** Map `WebhookClient` instances to their monitor keys to prevent leaks.
5. **Partial Message Handling:** In `messageDelete` and `messageUpdate` events, always check for null `author` property to avoid runtime crashes on uncached partial messages.
6. **Centralized Settings Cache:** Always use `client.DB.getSettings(guildId)` instead of raw SQLite select queries for `guild_settings` to leverage central caching and automatic default generation.
7. **Category Role Selection Limits:** Do not count general guild roles when checking role selection limits; filter the user's role list using only the specific role IDs registered under that category.