Official website: https://guilty-spark.app
A powerful Discord Bot built on Cloudflare Workers that seamlessly integrates Halo Infinite match statistics from Halo Waypoint with Discord communities. The bot specializes in working with NeatQueue-managed custom game series, providing automated statistics posting and detailed match analysis.
- Halo Infinite Stats Integration: Pull match statistics directly from Halo Waypoint
- NeatQueue Integration: Automated webhook-based stats posting for custom game series
- HCS Maps Generator: Generate random HCS map sets with playlist and count selection, interactive UI, and user attribution
- Discord-Halo Account Linking: Connect Discord users to their Xbox gamertags
- Rich Match Embeds: Beautiful, game-mode-specific stat displays
- Comprehensive Setup System: Interactive configuration for servers and NeatQueue integration
- Automated Workflows: Automatic stats posting when matches complete
- Privacy-Aware: Respects Halo Waypoint privacy settings
Invite Guilty Spark to your Discord server with the necessary permissions.
- Configure the bot: Use
/setupto configure server settings and NeatQueue integration - Link accounts: Users can use
/connectto link their Discord accounts to Xbox gamertags - Retrieve match statistics: Use the
/statscommand to get Halo Infinite match and series stats - Generate map sets: Use the
/mapscommand to generate random HCS map sets for your games
Configure Guilty Spark for your server preferences (admin only command)
/setup
Interactive configuration system with comprehensive options:
- Stats Display Mode: Choose between series-only or series + individual games
- Channel Permissions: Verify bot permissions in target channels
- Webhook Configuration: Secure webhook authentication for automated stats
- Channel Mapping: Configure queue and results channels
- Display Options: Choose how stats are posted (threaded replies, new messages, dedicated channel)
- Live Tracking: Enable real-time match updates during series
- NeatQueue Informer: Announce player connections when queues start
Users link their Discord account to Xbox gamertag for automatic stat retrieval:
/connect
Features:
- Gamertag Search: Find Xbox accounts by name
- Account Verification: Confirm correct account before linking
- Link Management: Update or remove existing connections
- Privacy Handling: Graceful handling of restricted accounts
Access stats data for a previously played NeatQueue series:
/stats neatqueue [channel] [queue_number]
Retrieves comprehensive statistics for completed NeatQueue series:
channel(optional): Discord channel to search (defaults to current)queue_number(optional): Specific queue number (defaults to most recent)
recording-20250604-stats-command.mp4
Automated Process:
- Locates NeatQueue results in specified channel
- Extracts participant Discord users
- Matches users to Xbox gamertags via
/connectlinks or username matching - Queries Halo Waypoint for custom games with all participants
- Displays comprehensive match and series statistics
/stats match <match_id>
Retrieves detailed statistics for any specific Halo match using its unique identifier.
Generate random map sets for competitive play:
/maps [count] [playlist]
Options:
count: Number of maps (1, 3, 5, 7; default: 5)playlist: Map pool (HCS - currentorHCS - historical; default: current)
Interactive Features:
- Re-roll buttons for different map counts
- Playlist selector for switching map pools
- User attribution for generated sets
Start live tracking for ongoing NeatQueue series:
/track <queue_number> [channel]
Note: Live tracking typically starts automatically via NeatQueue webhooks. This command provides manual control when needed.
Guilty Spark provides deep integration with NeatQueue queue management system, enabling automated workflows and real-time tracking.
Essential Setup Steps:
- Configure webhook in NeatQueue pointing to your Guilty Spark instance
- Set webhook secret for security via
/setup - Map NeatQueue channels to Discord channels
- Choose appropriate display mode for stats posting
recording-20250604-neatqueue-integration.mp4
Event-Driven Automation:
- Series Start: NeatQueue webhooks notify Guilty Spark when series begin
- Team Creation: Automatic live tracking initialization if enabled
- Match Completion: Real-time statistics retrieval and posting
- Series End: Final statistics compilation and live tracking cleanup
Display Options:
- Threaded Replies: Stats posted as replies to NeatQueue results messages
- Channel Messages: New messages in results channel or dedicated stats channel
- Live Updates: Real-time series overview during active matches
Automated real-time tracking for ongoing NeatQueue series with comprehensive match monitoring.
Core Features:
- Automatic Lifecycle: Starts when teams are created, stops when series complete
- Live Updates: Series overview refreshes every 3 minutes during active matches
- Interactive Controls: Refresh, Pause and Resume
- Substitution Support: Automatic handling of player changes with chronological tracking
- Update queue channel name: In progress series score in the channel name
Real-time player connection announcements when queues start:
Features:
- Announces which players join queues immediately
- Server-wide configuration via
/setup - Automatic permission checking and self-disabling if missing
- Works alongside other NeatQueue integration features
Requirements:
- View Channel and Send Messages permissions
- Enabled via
/setup→ "Configure NeatQueue Informer"
- View Channel: Read the channel where tracking is posted
- Send Messages: Post initial live tracker message
- Use External Emojis: Display team emojis and status indicators
Live Tracker Issues:
- Verify Live Tracking enabled in
/setup→ "Configure NeatQueue Integration" - Check bot permissions in target channels (View Channel, Send Messages)
- Use manual refresh button for immediate updates during API issues
Stats Not Posting:
- Confirm webhook configuration and secret match NeatQueue settings
- Verify channel mapping in
/setup - Check that results messages contain expected Discord user mentions
- Node.js ≥ 24.11.0
- Cloudflare account with Workers and D1 access
- Discord application with bot token
-
Clone the repository:
git clone https://github.com/davidhouweling/guilty-spark.git cd guilty-spark -
Install dependencies:
npm install
-
Configure environment:
- Follow Discord/Cloudflare sample app guide for initial setup
- Create
.dev.varsfile with required environment variables - Set up Cloudflare D1 database and KV namespace
-
Register Discord commands:
npm run register
-
Start development server:
npm start
-
Set up ngrok tunnel (for webhook testing):
npm run ngrok
Due to historical issues encountered in the past when Cloudflare workers would encounter a HTTP 526 when calling Halo Waypoint, a proxy call can be leverage instead. With the blessing of Haloquery, we can proxy calls to their service.
Control Mechanisms:
- Environment Variable:
PROXY_WORKER_URL- Set to proxy server URL (e.g.,https://haloquery.com/proxy) - Master Toggle:
halo:proxy:enabledKV key - Manual control via Cloudflare UI - Auto-Activation:
halo:proxy:circuit_breakerKV key - Automatically managed during incidents
Error Tracking: All proxy activations and rate limit errors are logged to Sentry for monitoring
This ensures the bot remains operational even during Halo Waypoint API incidents, providing a seamless experience for users.
- Minimal data collection focused on functionality
- Respects Halo Waypoint privacy settings
- Secure webhook authentication with HMAC
- No storage of sensitive Xbox authentication tokens
- Users control their own account linking
- Graceful handling of private Halo profiles
- Option to remove account associations
- Issues: Report bugs or request features on GitHub Issues
- Discussions: Join community discussions for support and feature requests
Contributions are welcome! Please read our contributing guidelines and submit pull requests for any improvements.
This project is licensed under the MIT License - see the LICENSE file for details.
- Terms of Service - Legal terms for using Guilty Spark
- Privacy Policy - How we handle your data
- Cloudflare Workers Docs - Platform documentation
- Discord API Docs - Discord development resources
- NeatQueue - Queue management system
- Halo Infinite API - Halo Waypoint API wrapper
Made with ❤️ for the Halo community
Guilty Spark is not affiliated with Microsoft, 343 Industries, or Halo. All trademarks are property of their respective owners.
