Skip to content

V15#18

Open
Miky88 wants to merge 8 commits into
mainfrom
v15
Open

V15#18
Miky88 wants to merge 8 commits into
mainfrom
v15

Conversation

@Miky88
Copy link
Copy Markdown
Owner

@Miky88 Miky88 commented Apr 30, 2026

No description provided.

justty3p and others added 6 commits February 2, 2026 19:24
- Database: split into a registry (core/Database.js) of DatabaseHandle
  instances, one Loki file per module under data/<Module>.db. Adds a
  one-shot migrate() helper that copies legacy module_X / settings_X
  collections out of database.db into the new per-module layout.
- ErrorHandler: new core/ErrorHandler.js. Hooks process and discord.js
  error/warning events, dedup-windowed, writes JSONL + log to logs/,
  optional Discord embed reporting via config.errorReporting. Wraps
  module event dispatch and command execution so a single failure no
  longer breaks the chain. exitOnUncaught = true for Docker restarts.
- LocalizationManager: rewritten to load module-owned locales from
  modules/<Mod>/locales/<lang>.yaml and merge under modules.<Mod>.
  Drops the global /locales/ dir entirely. Auto-syncs missing keys by
  inserting the dotted path as the value. Discord-style locale fallback
  (en-US -> en-GB). Adds Intl.DisplayNames-based languageName().
  All module strings migrated out of the old global locale files.
- Module/SettingsManager/ModuleManager: usesDB removed in favor of the
  databases option; SettingsManager and ModuleManager go through the
  registry instead of poking client.database.db directly.
- ConfigurationManager: track a mutated flag so newly-added default
  keys actually persist on rewrite (the key-count check was a no-op
  for adds).
- modules/Utility/commands/ping.js: withResponse: true returns an
  InteractionCallbackResponse; pull the message off response.resource.
- gitignore: add data/ and logs/.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Permissions: new core/Permissions.js — per-guild custom level ladder
  (member/helper/moderator/admin seeded by default; admins can rename,
  reweight, add custom levels, and delete any of them). Roles bind to
  levels; a member's effective weight is the max across overlapping
  bindings. User-, command-, and setting-level overrides supported.
  Resolver short-circuits on bot OWNER, guild owner, and Discord
  Administrator. Override-driven by design: modules don't ship gates,
  the resolver only enforces when an admin has set an override.
- SettingsManager rewrite: schema-driven, no backward compat. Each key
  declares { type, default, description?, validate? }. Built-in types:
  string/boolean/number/integer/snowflake (channel/role/user)/array<X>
  /enum:a|b|c. String inputs from slash commands are coerced before
  validation. Auth via Permissions.check on each mutation when an
  actor is supplied.
- /permissions command replaced with an in-Discord GUI panel
  (modules/Utility/lib/PermissionsUI.js): single ephemeral message with
  StringSelect navigation + RoleSelect/UserSelect pickers + modals for
  forms. Custom-id convention `perms:<screen>[:<arg>]` carries state.
  Each section has inline documentation explaining what it manages and
  how the resolver chain composes.
- /settings rewritten to use the schema, validates per-key, defers to
  Permissions for setting overrides.
- Command.requires field removed — was a module-side default that
  duplicated Discord's defaultMemberPermissions; admins delegate via
  /permissions overrides instead.
- Drop circular `require('../index.js')` in core/Module.js and
  core/Database.js (was JSDoc-only but executed index.js side effects,
  blocking standalone loading of core files).
- Strip box-drawing section divider comments across core/ and
  modules/Utility/lib (44 lines removed).
- CHANGELOG.md: document this change set + the prior ac6e616 commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Miky88 Miky88 requested a review from GalaxyVinci05 April 30, 2026 14:37
@Miky88 Miky88 self-assigned this Apr 30, 2026
@Miky88 Miky88 added the enhancement New feature or request label Apr 30, 2026
@Miky88 Miky88 moved this from Backlog to In progress in Modular v15 roadmap Apr 30, 2026
Miky88 added 2 commits April 30, 2026 20:13
Consolidates module manager access under a single property, standardizing interactions across the codebase and replacing scattered references. Simplifies database declaration logic for modules, enforcing explicit string array usage for collection names and providing safer accessor methods. Cleans up code by removing unnecessary comments and improves maintainability with new helper methods for module queries and command publishing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

2 participants