Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

38 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ PikaStatsBot

License Python discord.py Stars

The ultimate Pika Network statistics Discord bot โ€” Track player stats, compare players, monitor guilds, view skins, and much more!

Invite Bot โ€ข Report Bug โ€ข Request Feature


โœจ Features

๐ŸŽฎ 10+ Game Mode Statistics

Get detailed stats with auto-calculated ratios (KDR, WLR, FKDR, arrow accuracy) for:

Game Mode Command Modes Available
๐Ÿ›๏ธ BedWars /bw Solo, Doubles, 3v3v3v3, 4v4v4v4, Ranked
โš”๏ธ SkyWars /sw Solo, Doubles, Mega, Ranked
๐ŸฅŠ Unranked Practice /practice Boxing, NoDebuff, Gapple, Sumo, BuildUHC, Combo, Debuff, Fist, Spleef
๐Ÿ† Ranked Practice /ranked Boxing, NoDebuff, Gapple, Sumo, BuildUHC, Combo, Debuff, Fist, Spleef
โค๏ธ Lifesteal /lifesteal All Modes
๐Ÿ—ก๏ธ KitPvP /kitpvp All Modes
๐ŸŒฒ Survival /survival All Modes
๐Ÿ๏ธ OP Skyblock /opskyblock All Modes
๐ŸŒด Classic Skyblock /classicskyblock All Modes
โšก OP Factions /opfactions All Modes

All stats support 4 time intervals: Total, Monthly, Weekly, Daily.

๐Ÿ‘ค Rich Player Profiles

  • Rank & Level with progress bar
  • Online status detection
  • Guild membership info
  • Verification badges (Discord, Email, Booster)
  • Minecraft avatar display

โš”๏ธ Player Comparison

  • Compare any two players side by side
  • Color-coded indicators (๐ŸŸข Better, ๐Ÿ”ด Worse, ๐ŸŸก Tied)
  • Auto-calculated ratio comparisons
  • Quick shortcuts: /bw-compare, /sw-compare

๐Ÿฐ Guild System

  • Guild info โ€” Owner, level, creation date, member count
  • Member list โ€” Full guild roster
  • Guild tracking โ€” Real-time notifications when members join/leave
  • Background monitoring every 5 minutes

๐ŸŽจ Skin & Avatar Viewer

  • Full body render of Minecraft skins
  • 3D head render
  • 2D face avatar
  • Download links for all formats

๐Ÿ”ง Utility Features

  • Interactive help menu with dropdown categories
  • Bot statistics โ€” Server count, uptime, latency
  • Server info โ€” Discord server details
  • Vote reminders โ€” Configurable daily DM reminders
  • Ping checker โ€” WebSocket & API latency

๐Ÿ“ธ Screenshots

Click to view screenshots

Stats Command

/bw PlayerName total solo

Shows BedWars stats with KDR, WLR, FKDR ratios, arrow accuracy, and leaderboard rankings.

Player Comparison

/compare Player1 Player2 bedwars total ALL_MODES

Side-by-side comparison with color-coded indicators.

Player Profile

/profile PlayerName

Rich profile with rank, level progress bar, guild info, and online status.

Guild Info

/guild GuildName

Complete guild information with member roster.


๐Ÿš€ Quick Start

Prerequisites

Installation

  1. Clone the repository

    git clone https://github.com/codewithriza/PikaStatsBot.git
    cd PikaStatsBot
  2. Create a virtual environment (recommended)

    python -m venv .venv
    source .venv/bin/activate  # Linux/macOS
    # or
    .venv\Scripts\activate     # Windows
  3. Install dependencies

    pip install -r bot/requirements.txt
  4. Configure the bot

    cp .env.example .env

    Edit .env and add your Discord bot token:

    DISCORD_TOKEN=your_bot_token_here
  5. Run the bot

    python -m bot.bot

Discord Bot Setup

  1. Go to Discord Developer Portal
  2. Create a New Application
  3. Go to Bot โ†’ Click Add Bot
  4. Copy the Token and paste it in your .env file
  5. Enable these Privileged Gateway Intents:
    • โœ… Message Content Intent
  6. Go to OAuth2 โ†’ URL Generator:
    • Scopes: bot, applications.commands
    • Permissions: Send Messages, Embed Links, Read Message History, Use External Emojis
  7. Use the generated URL to invite the bot to your server

๐Ÿ“ Project Structure

PikaStatsBot/
โ”œโ”€โ”€ bot/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ bot.py              # Main bot entry point & setup
โ”‚   โ”œโ”€โ”€ config.py           # Configuration management
โ”‚   โ”œโ”€โ”€ requirements.txt    # Python dependencies
โ”‚   โ”œโ”€โ”€ cogs/
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ”œโ”€โ”€ stats.py        # Game stats commands (10+ game modes)
โ”‚   โ”‚   โ”œโ”€โ”€ profile.py      # Profile, friends, skin, avatar commands
โ”‚   โ”‚   โ”œโ”€โ”€ guild.py        # Guild info, members, tracking commands
โ”‚   โ”‚   โ”œโ”€โ”€ compare.py      # Player comparison commands
โ”‚   โ”‚   โ””โ”€โ”€ utility.py      # Help, ping, vote, bot info commands
โ”‚   โ””โ”€โ”€ utils/
โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚       โ”œโ”€โ”€ api.py           # Async Pika Network API wrapper with caching
โ”‚       โ””โ”€โ”€ embeds.py        # Embed builder utilities
โ”œโ”€โ”€ .env.example             # Environment variable template
โ”œโ”€โ”€ .gitignore               # Git ignore rules
โ”œโ”€โ”€ CONTRIBUTING.md          # Contribution guidelines
โ”œโ”€โ”€ LICENSE                  # MIT License
โ””โ”€โ”€ README.md                # This file

๐Ÿ“‹ All Commands

๐ŸŽฎ Game Stats

Command Description
/bw <player> [interval] [mode] BedWars statistics
/sw <player> [interval] [mode] SkyWars statistics
/practice <player> [interval] [mode] Unranked Practice statistics
/ranked <player> [interval] [mode] Ranked Practice statistics
/lifesteal <player> [interval] Lifesteal statistics
/kitpvp <player> [interval] KitPvP statistics
/survival <player> [interval] Survival statistics
/opskyblock <player> [interval] OP Skyblock statistics
/classicskyblock <player> [interval] Classic Skyblock statistics
/opfactions <player> [interval] OP Factions statistics
/stats <player> <game> [interval] [mode] Any game mode (generic)

๐Ÿ‘ค Profile

Command Description
/profile <player> View player profile
/friends <player> View friends list
/skin <player> View Minecraft skin (full body)
/avatar <player> View Minecraft head avatar

๐Ÿฐ Guild

Command Description
/guild <name> View guild information
/guild-members <name> List all guild members
/guild-track <name> Track guild member changes
/guild-untrack <name> Stop tracking a guild

โš”๏ธ Compare

Command Description
/compare <p1> <p2> [game] [interval] [mode] Compare two players
/bw-compare <p1> <p2> [mode] Quick BedWars comparison
/sw-compare <p1> <p2> [mode] Quick SkyWars comparison

๐Ÿ”ง Utility

Command Description
/help Interactive help menu
/ping Check bot latency
/vote Pika Network vote links
/botinfo Bot statistics & info
/serverinfo Discord server info
/invite Bot invite link

โš™๏ธ Configuration

All configuration is done through environment variables (.env file):

Variable Required Default Description
DISCORD_TOKEN โœ… Yes โ€” Your Discord bot token
BOT_PREFIX No ! Legacy command prefix
OWNER_ID No 0 Your Discord user ID
VOTE_REMINDER_USER_ID No 0 User ID for vote reminders (0 = disabled)
VOTE_REMINDER_HOUR No 18 Hour to send reminder (24h format)
VOTE_REMINDER_TIMEZONE No Asia/Kolkata Timezone for reminders

๐Ÿ”Œ API Reference

PikaStatsBot uses the following Pika Network API endpoints:

Player Profile

GET https://stats.pika-network.net/api/profile/{player_name}

Returns: username, rank, level, experience, lastSeen, friends, clan, verification status.

Player Statistics

GET https://stats.pika-network.net/api/profile/{player_name}/leaderboard?type={game}&interval={interval}&mode={mode}
  • type: bedwars, skywars, unrankedpractice, rankedpractice, lifesteal, kitpvp, survival, opskyblock, classicskyblock, opfactions
  • interval: total, monthly, weekly, daily
  • mode: ALL_MODES, solo, doubles, etc.

Guild Information

GET https://stats.pika-network.net/api/clans/{guild_name}

Returns: name, tag, owner, members, leveling, creationTime.

Minecraft UUID (via Minetools)

GET https://api.minetools.eu/uuid/{player_name}

Skin Renders (via Crafatar)

GET https://crafatar.com/avatars/{uuid}
GET https://crafatar.com/renders/head/{uuid}
GET https://crafatar.com/renders/body/{uuid}
GET https://crafatar.com/skins/{uuid}

๐Ÿ—๏ธ Architecture

  • Async-first โ€” All API calls use aiohttp for non-blocking I/O
  • Caching โ€” 2-minute TTL cache to reduce API load and improve response times
  • Modular cogs โ€” Each feature area is a separate cog for maintainability
  • Error handling โ€” Global error handler + per-command error handling
  • Logging โ€” Structured logging to console and file
  • Type hints โ€” Full type annotations throughout the codebase

๐Ÿค Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Quick start:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Test thoroughly
  5. Submit a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License โ€” see the LICENSE file for details.


โš ๏ธ Disclaimer

PikaStatsBot is not affiliated with, endorsed by, or partnered with PikaNetwork. All data is fetched from publicly available API endpoints.


Discord GitHub X

Made with โค๏ธ by codewithriza

About

Pika Stats Bot provides statistics for Pika Network games, offering player profiles, game stats, guild information, and daily vote reminders.

Topics

Resources

Contributing

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages