# Leaderboard Bot
hey
A Discord bot for Minecraft PvP server stats — player lookups, ranked leaderboards, kill/win tracking, kit stats, and live server info. Built with Discord.js v14 and the new embed + button component system.
---
## Features
## Prerequisites
## Setup
### 1. Clone or download the project
### 2. Install dependencies
### 3. Configure environment
Copy the example env file and fill in your values:
Edit
| Variable | Where to find it |
|---|---|
|
|
|
|
|
### 4. Start the bot
The bot will:
1. Log in to Discord
2. Automatically register all slash commands
3. Print
### 5. Invite the bot to your server
Go to Discord Developer Portal → OAuth2 → URL Generator:
---
## Commands
| Command | Description |
|---|---|
|
|
|
### Player Profile Buttons
| Button | Shows |
|---|---|
|
Overview | Kills, deaths, K/D, duel record, FFA stats |
|
Ranked | Tier, ELO, peak ELO, win/loss record |
|
Kits | Per-kit ELO, tier, win/loss, streaks |
### Leaderboard Buttons
hey
A Discord bot for Minecraft PvP server stats — player lookups, ranked leaderboards, kill/win tracking, kit stats, and live server info. Built with Discord.js v14 and the new embed + button component system.
---
## Features
- Player Profiles — Look up any player by name or UUID. View combat stats, ranked info, and per-kit breakdowns with tabbed navigation buttons.
- Player Skins — Renders Minecraft player busts via Visage directly in embeds.
- Leaderboards — Global ranked, top kills, top wins, and per-kit leaderboards with pagination and type-switching buttons.
- Server Status — Online player count and available kits at a glance.
## Prerequisites
- Node.js v18 or later
- A Discord Bot application (from Discord Developer Portal)
- Your PvP API server running with a valid API key
## Setup
### 1. Clone or download the project
Bash:
cd Leaderboard
Bash:
npm install
Copy the example env file and fill in your values:
Bash:
cp .env.example .env
.env:
Code:
DISCORD_TOKEN=your-discord-bot-token
DISCORD_CLIENT_ID=your-discord-client-id
DISCORD_GUILD_ID=your-guild-id
API_BASE_URL=http://your-server:3001
API_KEY=your-api-key
|---|---|
|
DISCORD_TOKEN | Discord Developer Portal → Bot → Token → Reset Token ||
DISCORD_CLIENT_ID | Discord Developer Portal → General Information → Application ID ||
DISCORD_GUILD_ID | Right-click your Discord server → Copy Server ID (enable Developer Mode in settings) ||
API_BASE_URL | Your PvP plugin API address, e.g. http://123.456.789.0:3001 ||
API_KEY | The api.api-key value from your plugin's config.yml |### 4. Start the bot
Bash:
npm start
1. Log in to Discord
2. Automatically register all slash commands
3. Print
Bot is ready when fully operational### 5. Invite the bot to your server
Go to Discord Developer Portal → OAuth2 → URL Generator:
- Scopes:
bot,applications.commands - Bot Permissions:
Send Messages,Embed Links,Use External Emojis,Read Message History
---
## Commands
| Command | Description |
|---|---|
|
/player <name> | Look up a player's combat stats, ranked data, and kit stats. Navigate between tabs using buttons. ||
/leaderboard [type] [kit] | View leaderboards. Type can be Global Ranked, Top Kills, or Top Wins. Pass a kit name for kit-specific rankings. ||
/server | View server status — online players and available kits. |### Player Profile Buttons
| Button | Shows |
|---|---|
|
|
|
### Leaderboard Buttons
- Type switcher:
Global /
Kills /
Wins - Pagination: « First / ‹ Previous / Page X/Y / Next › / Last »
A Discord bot for Minecraft PvP server stats — player lookups, ranked leaderboards, kill/win tracking, kit stats, and live server info. Built with Discord.js v14 and the new embed + button component system.
---
## Features
---
## Features
- Player Profiles — Look up any player by name or UUID. View combat stats, ranked info, and per-kit breakdowns with tabbed navigation buttons.
- Player Skins — Renders Minecraft player busts via Visage directly in embeds.
- Leaderboards — Global ranked, top kills, top wins, and per-kit leaderboards with pagination and type-switching buttons.
- Server Status — Online player count and available kits at a glance.
