Discord 自己紹介認証Bot

Discord 自己紹介認証Bot

#Node.js#Discord.js#TypeScript

Overview

A Discord bot for community onboarding: users click verify, fill a modal, and get a role automatically—cutting manual admin work and lowering the join barrier. Runs on a home Raspberry Pi. Audit trail uses embed posts to a mod channel instead of a database.

Challenges & Solutions

[PROBLEM_1] Uptime & error handling

Needed 24/7 resilience to blips and rate limits. Docker plus reconnect logic and careful exception handling keep it stable long term.

[PROBLEM_2] Deploy automation

GitHub Actions CI/CD deploys from main to the Pi so releases are repeatable and less error-prone than manual SSH.

[PROBLEM_3] Testable core logic

Vitest tests the auth flow without hitting Discord live, so rules stay verifiable as the bot evolves.

Future Improvements

  • Web settings dashboard

    Goal: change channels and roles from a browser instead of config files only.

  • Multi-guild support

    Today tuned for one server; planning DB-backed config for many installs.

Tech Stack

  • Runtime: Node.js
  • Library: Discord.js
  • Language: TypeScript
  • Infrastructure: Raspberry Pi 4 (Ubuntu)
  • Container: Docker
  • Test: Vitest