VinceC 584fba7aa0 Update CommandHandler.js
# VRBattles Bot Updates - March 2024

## Command Improvements

### Find Team Command (`/findteam`)
- 🔄 Restructured command to require game selection before team name
- 🖼️ Added VR Battles image as the main embed image
- 🧹 Removed all buttons for cleaner display
- 📊 Implemented game mode sorting:
  - Priority order: Squads > Duo > Solo
  - Secondary sort by creation date (newest first)
- 🎨 Added game mode icons:
  - Squads: 🎮
  - Duo: 🎯
  - Solo: ⚔️
- 📝 Condensed stats display format:
  - M: matches
  - W: wins
  - L: losses
  - WR: win rate
- 👥 Made all team search results visible to everyone in the channel

### Find User Command (`/finduser`)
- 🔄 Restructured command to require game selection before username
- 🖼️ Added VR Battles image as the main embed image
- 🔍 Enhanced user search results:
  - Shows basic profile info even when no game stats are found
  - Displays user's avatar, bio, level, XP, and other profile details
  - Indicates if user is on a team but hasn't played matches
- 🔵 Simplified button layout:
  - Removed Discord invite button
  - Kept only the "View Profile" button
- 💬 Improved status messages:
  - Clear indication when user exists but hasn't played selected game
  - Shows team membership status for the selected game
2025-01-04 11:16:49 -06:00
2024-09-22 01:51:10 -05:00
2025-01-04 08:59:51 -06:00
2025-01-04 11:16:49 -06:00
2024-09-16 07:29:02 -05:00
2024-09-22 01:51:10 -05:00
2025-01-04 08:59:51 -06:00
2025-01-04 08:59:51 -06:00
2025-01-04 08:59:51 -06:00
2024-09-16 07:29:02 -05:00
2024-11-07 17:28:00 -06:00
2024-11-28 02:53:42 -06:00
2025-01-04 08:59:51 -06:00
2025-01-04 08:59:51 -06:00
2025-01-04 08:59:51 -06:00
2024-09-16 04:22:47 -05:00

VRBattles Discord Bot (Development)

This is the development version of the VRBattles Discord Bot. It connects to the VRBattles API and provides various commands for users to interact with VRBattles data through Discord.

Setup

  1. Clone the repository:
git clone <repository-url>
cd discord-bot
  1. Install dependencies:
npm install
  1. Create a .env file based on .env.example:
cp .env.example .env
  1. Set up your development environment:
  1. Update your .env file with the development credentials:
DISCORD_TOKEN=your_dev_bot_token
CLIENT_ID=your_dev_client_id
SUPABASE_URL=your_dev_supabase_url
SUPABASE_KEY=your_dev_supabase_key
NODE_ENV=development

Development

Start the bot in development mode:

npm run dev

Deploy slash commands to your development Discord server:

npm run deploy-commands:dev

Available Commands

  • /ping - Test bot connectivity
  • /finduser - Find a user by username
  • /matchhistory - View match history
  • /findteam - Find a team by name
  • /subscribe - Subscribe to game notifications (Admin only)
  • /unsubscribe - Unsubscribe from game notifications (Admin only)
  • /register_server - Register Discord server with BattleBot (Admin only)
  • /list_subscriptions - List all game subscriptions (Admin only)

API Integration

The bot connects to the following APIs:

  • VRBattles API (https://www.vrbattles.gg/api/)
  • Discord API (via discord.js)
  • Supabase Database

Contributing

  1. Create a new branch for your feature:
git checkout -b feature/your-feature-name
  1. Make your changes and commit them:
git add .
git commit -m "Description of your changes"
  1. Push to your branch:
git push origin feature/your-feature-name
  1. Create a Pull Request to merge into the dev branch
Description
VRBattles Discord Bot
Readme 34 MiB
Languages
JavaScript 98.2%
Shell 1.4%
Dockerfile 0.4%