BirdBot posts a random bird from a cached catalog fetched from https://ornithophile.vercel.app/api/birds and renders its info and image directly in Discord.
- Copy
.env.exampleto.envand fill in your Discord token and client ID. - Install dependencies with
npm install. - Register commands with
npm run register. - Start the bot with
npm start.
On first run, the bot downloads the bird catalog JSON and saves it to data/birds.json. Later runs reuse that file.
If you use the fixed-time schedule, set TZ in .env so times like 7am and 7pm match your local timezone.
Use Docker Compose from the repo root:
docker compose up --build -dThe container runs npm run register first and then starts the bot. The service restarts automatically unless stopped, and the cached bird data is stored in the named volume birdbot-data.
Open the local status page at http://localhost:8080.
Check JSON health data at http://localhost:8080/health.
To stop it later:
docker compose down/bird post interval:<hourly|twelve_hours|daily> [channel]starts a schedule and posts immediately./bird times times:<7am,7pm|07:00,19:00> [channel]posts every day at the selected times and usesTZfrom.env./bird stop [channel]stops the schedule./bird now [channel]posts a bird right away./bird statusshows the active schedule.
src/contains the bot source.data/stores saved schedules when running locally.Dockerfileanddocker-compose.ymlare ready for container deployment.
Github Repo: ekohrt