Conversation
Add a global core guildCreate listener: explicit config init on first join, reinstall of enabled modules guild commands on rejoin (Discord purges them on kick), and a Components V2 welcome message in the system channel with owner DM fallback. Nothing is deleted on leave so a rejoin restores history. updateModuleActivation is now an upsert. Co-Authored-By: Claude Code <noreply@anthropic.com>
Rethrow Discord failures from install/uninstall so the DB state only
flips on success; skip the activatedVersion bump on failed updates so
they retry next boot. Tolerate missing activatedVersion (""/null) as
0.0.0 instead of throwing. Resync downgraded guilds instead of leaving
them behind. Fetch dev-guild module states in parallel and share one
bulk-PUT helper between the dev and prod paths.
Co-Authored-By: Claude Code <noreply@anthropic.com>
A throwing onInstall/onUninstall no longer leaves the guild marked enabled/disabled, which used to deadlock the next install with "already installed". Co-Authored-By: Claude Code <noreply@anthropic.com>
References to deleted channels/roles/users deserialized to null and crashed consumers (e.g. channel.id). Lists now filter them out with a structured warning instead of console.warn. Co-Authored-By: Claude Code <noreply@anthropic.com>
The old heuristic could return a member user id or a whole event object as guildId. Only real string ids resolve now; guild-less events run without config. Co-Authored-By: Claude Code <noreply@anthropic.com>
Autocomplete now receives the command module config instead of the core one. Command execution is wrapped in try/catch with an ephemeral error reply (followUp when already answered) and guild-less interactions are ignored. New requiresAdmin flag on commands, enforced centrally and set on both core commands. Duplicate interaction customIds warn at dispatch; rejected interaction checks log at debug. Co-Authored-By: Claude Code <noreply@anthropic.com>
A broken module import or a throwing onLoad no longer aborts the whole boot: the module is skipped with an error log. onLoad supports async and all three lifecycle hooks are optional, dropping the log-only boilerplate from the example modules. Co-Authored-By: Claude Code <noreply@anthropic.com>
Also drops the declared-but-never-propagated configType field from event listeners. Co-Authored-By: Claude Code <noreply@anthropic.com>
New #lib/testing.js: makeTestConfig, fakeGuild/fakeChannel/fakeMessage, initTestI18n and silenceLogs, so module tests stop reinventing mocks (and stop accidentally booting the bot). The guild-create listener test is migrated onto them as proof. Co-Authored-By: Claude Code <noreply@anthropic.com>
validate-env-vars runs under tsx so it imports the single dev-mode definition from #lib/env.js instead of duplicating the development literal. dev/start scripts updated to match. Co-Authored-By: Claude Code <noreply@anthropic.com>
Generates a compiling, tested module skeleton (definition, config schema, namespaced example command, guarded example listener, en/fr i18n, commented Prisma model, test on the shared helpers). Co-Authored-By: Claude Code <noreply@anthropic.com>
The consolidator now reports the model and both files instead of failing late at generate time. Covered by a unit test; scripts tests join the unit project. Co-Authored-By: Claude Code <noreply@anthropic.com>
LOG_LEVEL accepts fatal/error/warn/info/debug/trace/silent and falls back to debug otherwise. Documented in AGENTS.md. Co-Authored-By: Claude Code <noreply@anthropic.com>
Document pnpm new-module and the shared test helpers, plus a pre-production checklist (version bump, prefixed names, DM guards, requiresAdmin, prisma order). Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Consolidates the existing module system (core + lib + tooling + docs) before new module development (e.g. Autopin). Stacked per-feature commits, all green (tsc, 144 unit, 36 integration).
Silent killers fixed
activatedVersiontolerated instead of throwing; downgrades resyncBoot resilience
onLoadskip the module instead of aborting boot;onLoadsupports asyncAuthor tooling
#lib/testing.js) +pnpm new-modulescaffold (verified end to end)requiresAdminon commands, duplicatecustomIdrejection, publishing checklist,LOG_LEVEL, TS env validator with one shared dev constant🤖 Generated with Claude Code