Skip to content

Repository files navigation

Divide Cup Discord Bot for Spectre Divide

Nest Logo

A Discord bot built with NestJS for managing esports tournaments and team competitions on Spectre Divide.

Features

  • Tournament Management

    • Create and manage tournaments
    • Automatic bracket generation
    • Match scheduling and results tracking
    • Real-time leaderboard updates
  • Team Management

    • Create and manage teams
    • Player invitations system
    • Team statistics tracking
    • Role-based permissions
  • Match System

    • Automated match creation
    • AI-powered match result validation and analysis
    • Score submission and verification
    • Match history tracking
    • ELO rating system
  • Server Management

    • Automated channel creation
    • Role management
    • Region-based categories
    • Welcome system with rules

Technology Stack

  • NestJS
  • Discord.js v14
  • PostgreSQL with Drizzle ORM
  • Redis for caching
  • Docker for deployment
  • OpenAI API for match result analysis
  • Steam API integration

Getting Started

Prerequisites

  • Node.js v18+
  • PNPM
  • PostgreSQL
  • Redis
  • Discord Bot Token
  • OpenAI API Key
  • Steam API Key

Installation

  1. Clone the repository
git clone https://github.com/cgarrot/divide_cups.git
cd divide_cups
  1. Install dependencies
pnpm install
  1. Create .env file with required environment variables:
env
DISCORD_TOKEN=your_discord_token
POSTGRES_USER=your_db_user
POSTGRES_PASSWORD=your_db_password
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_DB=divide_cup
REDIS_HOST=localhost
REDIS_PORT=6379
GUILD_ID=your_discord_server_id
OPENAI_API_KEY=your_openai_api_key
STEAM_API_KEY=your_steam_api_key
  1. Run database migrations
pnpm migrate

Docker

Deploy database and redis

docker-compose up -d

Bot Commands

User Commands

  • !help - Display available commands
  • !profile - Show user profile
  • !team create "Team Name" - Create a new team
  • !team add @Player - Invite player to team
  • !steam url - Link Steam profile
  • !region [NA|EU|ASIA|OCEA] - Set region

Admin Commands

  • !admin init - Initialize server setup
  • !sync-users - Synchronize users
  • !force-cleanup - Clean up roles/channels

Related Projects

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages