Skip to content

Byte-Bash-Blitz/BashEye

Repository files navigation

Byte-Bash-Blitz Discord Bot

A modular Discord bot for the Byte-Bash-Blitz server that monitors daily progress posts, awards points, tracks streaks, and provides API endpoints for monitoring.

Features

  • 🔍 Monitors 'basher-progress' category: Watches for messages in clan forum channels and their individual forums
  • 📸 Screenshot validation: Ensures messages contain image attachments
  • 📝 Text validation: Requires at least 35 words in the progress update
  • 🎯 Daily point system: Awards 5 points once per day per member
  • 🗄️ Database integration: Connects to Supabase to manage member points
  • Visual feedback: Reacts with checkmark emoji when points are awarded

How It Works

  1. Category Monitoring: The bot monitors all channels within the 'basher-progress' category
  2. Forum Detection: Specifically looks for forum channels and their individual forum threads
  3. Content Validation: Checks each message for:
    • At least one image attachment (screenshot)
    • Minimum 50 words of text content
  4. Daily Limit: Each member can only receive points once per day, regardless of how many messages they post
  5. Database Update: Awards 5 points with description format PU-{date} (e.g., PU-20Sep25)

Database Schema

The bot expects these tables in your Supabase database:

Members Table

  • id: Primary key
  • discord_username: Discord username (used for matching)

Points Table

  • member_id: Foreign key to members table
  • organiser_id: Set to 77 (bot's unique ID)
  • points: Number of points awarded (5 for daily updates)
  • description: Format PU-{date}

Environment Variables

Make sure your .env file contains:

DISCORD_BOT_TOKEN=your_bot_token
DISCORD_GUILD_ID=your_server_id
SUPABASE_URL=your_supabase_url
SUPABASE_ANON_KEY=your_supabase_anon_key

Installation & Usage

  1. Install dependencies:

    npm install
  2. Start the bot:

    npm start
  3. Development mode (with auto-restart):

    npm run dev

Bot Permissions Required

Make sure your Discord bot has these permissions:

  • Read Messages
  • Send Messages
  • Add Reactions
  • View Channels
  • Read Message History

Logging

The bot provides detailed console logging:

  • ✅ Successful point awards
  • ❌ Failed validations (missing image, insufficient text, etc.)
  • ℹ️ Duplicate submission attempts
  • 🚀 Bot startup information

Support

If you encounter any issues:

  1. Check the console logs for error messages
  2. Verify your Discord bot permissions
  3. Ensure your Supabase credentials are correct
  4. Make sure the 'basher-progress' category exists in your server

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors