Thank you for your interest in contributing! This document describes how to add new bots, fix bugs, and submit changes.
- Node.js 18+
- pnpm (
npm install -g pnpm) - A running TDN API instance (
config.jsonpointing to it)
git clone https://github.com/your-org/tdn-system-bots
cd tdn-system-bots
pnpm install
cp config.example.json config.json # fill in your credentials- Create the bot directory under
src/bots/{name}/. - Add
update.jsif the project has GitHub releases (copy fromsrc/bots/typescript/update.js). - Add
news.jsif the project has an RSS/Atom feed (copy fromsrc/bots/typescript/news.js). - Register credentials in
config.jsonunder"bots". - Import and start the bot in
src/index.js. - Add metadata to the
BOTSarray inscripts/setup-bots.js. - Run
node scripts/setup-bots.jsto register the bot account.
See the Architecture section of the README for full details.
pnpm start # starts all botsLogs are written to stdout. RSS and GitHub requests are rate-limited automatically.
This project uses Prettier for formatting. It runs automatically on commit via Husky + lint-staged. To format manually:
pnpm exec prettier --write .Configuration: 4-space indent, double quotes, semicolons, trailing commas, 80-char print width.
- One bot (or one fix) per PR — keeps reviews focused.
- Make sure
pnpm exec prettier --check .passes before opening a PR. - Do not commit
config.json,*_state.json, orscripts/.setup-state.json— they are gitignored. - Write clear commit messages (what + why).
Please use the Bug Report issue template.