feat: multi-bot config.yaml, daemon auth guard, slash escape, health check #4

Closed
tata wants to merge 0 commits from tata/intergram-js:master into master
First-time contributor

Squashed single commit replacing PR #3.

Changes

  • config.yaml as single config source (per-bot settings, message_delay_second)
  • Daemon-mode auth guard: process.exit(1) on auth error (prevents GramJS memory leak from infinite auth retry)
  • Slash command escape for bot messages (fullwidth slash )
  • Health check endpoint (configurable health_port)
  • Memory cap via --max-old-space-size=1024
  • npm start integration (removed run.sh)
  • Removed .env fallbackconfig.yaml is the only config source

Files changed (9)

  • main.js — simplified entry point
  • src/config.js — new YAML config loader (76 lines)
  • src/relay.js — multi-endpoint relay with auth guard + slash escape
  • src/formatter.js — message formatting (unchanged from master)
  • config.yaml.example — full config template with comments
  • README.md — complete rewrite
  • package.json — added js-yaml dep + npm start script
  • Deleted: .env.example, run.sh

Co-authored-by: 拍拍 (eagle)
Co-authored-by: 踏踏 (tata)

Squashed single commit replacing PR #3. ## Changes - **config.yaml** as single config source (per-bot settings, `message_delay_second`) - **Daemon-mode auth guard**: `process.exit(1)` on auth error (prevents GramJS memory leak from infinite auth retry) - **Slash command escape** for bot messages (fullwidth slash `/`) - **Health check endpoint** (configurable `health_port`) - **Memory cap** via `--max-old-space-size=1024` - **npm start** integration (removed `run.sh`) - **Removed .env fallback** — `config.yaml` is the only config source ## Files changed (9) - `main.js` — simplified entry point - `src/config.js` — new YAML config loader (76 lines) - `src/relay.js` — multi-endpoint relay with auth guard + slash escape - `src/formatter.js` — message formatting (unchanged from master) - `config.yaml.example` — full config template with comments - `README.md` — complete rewrite - `package.json` — added js-yaml dep + npm start script - Deleted: `.env.example`, `run.sh` Co-authored-by: 拍拍 (eagle) Co-authored-by: 踏踏 (tata)
- config.yaml as single config source (per-bot settings, message_delay_second)
- Daemon-mode auth guard: process.exit(1) on auth error (prevents memory leak)
- Slash command escape for bot messages (fullwidth slash)
- Health check endpoint (configurable health_port)
- Memory cap via --max-old-space-size=1024
- npm start integration (removed run.sh)
- Removed .env fallback

Co-authored-by: 拍拍 <eagle@baldbot.dev>
Co-authored-by: 踏踏 <tata@mingtsay.tw>
eagle closed this pull request 2026-03-20 14:22:24 +08:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
eagle/intergram-js!4
No description provided.