Repository navigation
feat: Let hosts make the bot their own with testify.config.json, and greet whoever adds it - #228
Merged
Merged
Conversation
…greet whoever adds it
…nd carry it into the image
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.
What this changes
testify.config.json, an optional file beside.env. It holds what makes a copy someone's own without editing code:repository,supportServer(nullhides Support),developer,operator(name plus an email orhttpscontact),defaultPrefixandgreetInviter. Every key defaults to the original's values, so a copy with no file behaves exactly as before.npm run devandnpm startread the same file.testify.config.schema.jsonis generated bynpm run config:schema, so editors check the file as it is typed.npm run setupends by offering to write one.docker-compose.ymlmounts the folder read-only, and theDockerfilecopies a committed file into/app, so hosts that build the image (Railway) pick it up. On the published image, a file goes on a volume andTESTIFY_CONFIGpoints at it.theme.tslosesauthor,repositoryandsupportServer, and every reader goes throughinstanceConfig(). A test fails if the original's repository, support invite orDEFAULT_PREFIXis written anywhere else insrc.operatoris set. The contact becomes a link only for an email address or anhttpspage.defaultPrefixreaches every server that never chose its own./help, the server's prefix, the setup checklist link (or the setup commands when the dashboard is off),/prefix, and the project's links.BotAddaudit entry, which an invite link, the Add App button and the App Directory all write. It asks once more after 3 seconds, and only takes an entry under 10 minutes old.debugline, and anything else awarn, so the greeting can never fail the join.greetInviter: falseget nothing.docs/customising.md), linked from the README, the docs index, the website's docs andhosting.md, which gains a "Your settings on Railway" section. AGENTS.md gains §14's config-file subsection and §21's greeting rules. The privacy notice mentions the greeting in all eight languages and its date moves to 18 Nov 2026.Why
/source-code, and pointed bug reports at the original's issues. Nobody running the published image could change that.shared/src/settings.ts.How to verify
npm run check.testify.config.example.jsontotestify.config.json, set"defaultPrefix": "!"and a bad key such as"supportserver": "x", thennpm run dev. Start-up stops with a box naming the bad key. Remove that key: the Settings line readsread from .env.development and testify.config.json, and!helpworks in a server that never set a prefix.operatorand open/privacy: the card names you, with your contact as a link.debugline and nothing else.Verified here:
npm run checkpasses, and the full root suite passes against a real MongoDB with the database suites included..dockerignore) was broken in turn and its test went red.dist/.COPYline was built on BuildKit and the legacy builder, with and without a config file.Not verified:
apt-getis blocked in the sandbox it was built in.hosting.md.Before you upgrade: a server whose prefix was saved before this change keeps
t?until somebody presses Reset on the prefix panel, even if it never chose a prefix. The guide says so.Checklist
develop, and this pull request targetsdevelopnpm run checkpassessave()on numeric fieldsembed()factoryconsole.*src/config/env.tsandscripts/setupEnv.ts(TESTIFY_CONFIGis inenv.ts, both.envtemplates anddocker-compose.yml; the wizard doesn't prompt for it, because blank is right almost everywhere)npm run docs:commandsre-run if a command changed (no command's name, options or description changed)Generated by Claude Code