Skip to content
프로젝트

소개

discord waifu / husbando gacha bot

웹 및 앱 개발

이 수치를 측정하는 방법

What you can do

  • Character collection via rolls and channel drops that require a name match to claim.
  • Trading between users and token exchange for characters.
  • Wishlist to track desired characters and find trading partners, including bulk add from anime or manga.
  • Profiles with favorite character, quote, and AniList link.

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Waifu Bot

Add to server

Waifu Bot is a Discord bot for collecting and trading anime and manga characters. Users roll for random characters, claim drops that appear after channel activity, build collections, and trade with other users.

Features

  • Character collection via rolls and channel drops that require a name match to claim.
  • Trading between users and token exchange for characters.
  • Wishlist to track desired characters and find trading partners, including bulk add from anime or manga.
  • Profiles with favorite character, quote, and AniList link.
  • Search for anime, manga, characters, and AniList users via AniList.
  • Web interface and API for browsing collections and wishlists.

The web interface is at waifugui.karitham.dev. The API is at waifuapi.karitham.dev and is defined in openapi.yaml; the frontend generates its client from that file.

Development

The project uses Nix flakes for development. The dev shell provides Go, Node.js, and required tools.

Prerequisites

  • Nix with flakes enabled
  • Direnv for automatic shell loading (optional)

Setup

git clone https://github.com/karitham/waifubot
cd waifubot
direnv allow
# OR
nix develop

Create environment variables for local development (.envrc is gitignored):

export BOT_TOKEN=...
export APP_ID=...
export PUBLIC_KEY=...
export DB_URL=postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable

For all options, see backend/cmd/waifubot/run.go.

Running locally

  1. Start PostgreSQL:

    docker-compose up -d
    
  2. Start the backend:

    cd backend
    go run ./cmd/waifubot run
    

    Migrations run automatically. The bot and API listen on http://localhost:8080 (/metrics on the same port). The frontend expects the API at that address.

  3. Start the frontend:

    cd frontend
    npm install
    npm run dev
    

    The frontend listens on http://localhost:5173.

For Discord slash commands, see backend/discord/commands.go and the in-app command list. For API details, see openapi.yaml.

Self-hosting

Backend

Build a binary with nix build .#waifubot or use the container from ghcr.io/karitham/waifubot. Provide a PostgreSQL database and the required environment variables (BOT_TOKEN, APP_ID, PUBLIC_KEY, DB_URL). Run with waifubot run.

For NixOS, see nix/module.nix. For Kubernetes, see karitham/infra.

Frontend

Build a static site:

cd frontend
npm install
VITE_API_URL=https://api.example.com npm run build

Deploy dist/ to any static host such as Cloudflare Pages, Vercel, or Netlify.

Set VITE_API_URL at build time to the API instance.

License

MIT — see LICENSE. Copyright 2020 PERY "Karitham" Pierre-Louis.

관련 프로젝트 살펴보기

불러오는 중…