Repository navigation
Releases
RoboBetBot v1.3.0
RoboBetBot v1.3.0
True Peer-to-Peer Betting System
This release implements proper stake calculation based on odds, fixing a fundamental economic flaw where both players wagered the same amount regardless of odds. Now favorites risk more to win less, while underdogs risk less to win more - ensuring the pot always balances.
What's New
Proper Peer-to-Peer Economics
Balanced Stake Calculation
- Previous Issue: Both players always staked the same amount, creating phantom money for payouts
- Solution: Stakes now vary based on odds to ensure pot equals winner's total return
- Result: Mathematically sound betting where all money comes from participants
Stake vs Payout Display
- Change: Bets now show "Stake" (what you risk) and "To Win" (potential profit) separately
- Benefit: Clear understanding of risk vs reward before joining a bet
- Example: Favorite might stake $75 to win $25, while underdog stakes $25 to win $75
How It Works
- Underdog (higher odds): Stakes less money for bigger potential win
- Favorite (lower odds): Stakes more money for smaller potential win
- Winner: Gets the entire pot (their stake back + opponent's stake)
- Loser: Loses only their stake amount
Example Scenarios
Even Odds (+100 both sides):
- Both stake: $25
- Both to win: $25
- Total pot: $50
Typical Spread (-110 both sides):
- Both stake: $27.50
- Both to win: $25
- Total pot: $55
Heavy Favorite (-300) vs Underdog (+250):
- Favorite stakes: $75 to win $25
- Underdog stakes: $25 to win $75
- Total pot: $100
Migration Instructions
Fresh Install (Recommended)
# Stop bot and delete old database
rm bets.db
# Update to v1.3.0
git pull origin main
# Start fresh with proper stake system
npm startPreserve Existing Bets
# Update to v1.3.0
git pull origin main
# Run migration script
node scripts/migrate-stakes.js
# Restart bot
npm startDocker/Dockge Users
docker-compose down
git pull origin main
docker-compose build --no-cache
docker-compose up -dPortable Users
Download v1.3.0 release and replace files (keep .env and optionally bets.db)
Important Changes
For Bet Creators
- The "amount" parameter now represents the base amount to win, not the stake
- Bot automatically calculates proper stakes based on odds
- You'll see different stake amounts for each side when odds differ
For All Users
- Stats now track actual money wagered (stakes), not base amounts
- Bet history shows your actual stake for each bet
- Leaderboard reflects true profit/loss based on stakes
Backward Compatibility
- Existing bets continue to work
- Database auto-calculates stakes for old bets if not migrated
- No breaking changes to commands or interface
Technical Details
Database Changes
- Added
side_a_stakeandside_b_stakecolumns to bets table - Automatic calculation for legacy bets without stake data
- Migration script available for updating existing records
Files Modified
commands.js: New stake calculation logic and display updatesdatabase.js: Support for stake columns with backward compatibilityscripts/migrate-stakes.js: New migration script for existing databases
Full Changelog: v1.2.1...v1.3.0
RoboBetBot v1.2.1
RoboBetBot v1.2.1
Critical Bug Fixes
This patch release fixes critical issues discovered in v1.2.0 that prevented proper bet participation and caused emoji conflicts.
What's Fixed
Critical Issues Resolved
Bet Creator Participation Bug
- Issue: Bet creators were completely blocked from participating in their own bets
- Fix: Creators can now properly take one side of their own bet
- Note: Creators still cannot bet against themselves (take both sides)
Prop Bet Emoji Conflict
- Issue: Prop bets used ❌ for Side B (Under/No), which conflicted with the cancellation emoji
- Fix: Changed prop bet emojis to ⬆️ (Over/Yes) and ⬇️ (Under/No)
- Benefit: Clear separation between joining and cancellation actions
Reaction Removal Bug
- Issue: Valid reactions were being immediately removed from bet messages
- Fix: Improved validation logic to only remove truly invalid reactions
- Result: Smooth interaction when joining bets
Emoji System Clarification
Joining Bets:
- Game Bets:
✈️ (Away) / 🏠 (Home) - Props: ⬆️ (Over/Yes) / ⬇️ (Under/No) - NEW!
- Futures: 🎯 (Choice A) / 🎲 (Choice B)
Resolving/Cancelling (All Types):
🅰️ = Side A wins🅱️ = Side B wins- ❌ = Cancel bet
Quick Update Instructions
Docker/Dockge Users
# Simply restart your container
docker-compose down
docker-compose up -d
# Or in Dockge: Stop → StartPortable Users
Download the new v1.2.1 release and replace files (keep your .env and bets.db)
Source Users
git pull origin main
npm install
npm startTesting the Fix
- Create a new bet
- As the creator, you should be able to click one side emoji
- For prop bets, look for the new ⬆️ ⬇️ emojis
- Active bets should show
🅰️ 🅱️ ❌ for resolution
Technical Details
- No database changes required
- Fully backward compatible with existing bets
- Only changes to commands.js reaction handling
Full Changelog: v1.2.0...v1.2.1
RoboBetBot v1.2.0
RoboBetBot v1.2.0
Emoji Resolution & Active Bet Cancellation
This release introduces emoji-based bet resolution and cancellation, making the betting experience significantly more user-friendly. Players can now resolve or cancel bets with simple emoji clicks instead of typing commands.
What's New
Major Features
Emoji-Based Resolution System
Active bets now display resolution emojis that both players can click to agree on outcomes:
🅰️ emoji indicates Side A wins🅱️ emoji indicates Side B wins- ❌ emoji cancels the bet by mutual agreement
- When both players click the same emoji, the action completes automatically
- No typing required - just click and done
Dual Resolution Methods
Players can choose their preferred method:
- Emoji Method (NEW) - Click emojis directly on the bet message
- Command Method - Use traditional
/bet resolveor/bet cancelcommands
- Both methods require consensus from both participants
- Mix and match - one player can use emoji, the other can use command
Resolution Tracking System
- Real-time vote tracking shows who voted for which outcome
- Status messages appear in chat: "Player X voted Side A wins, waiting for Player Y..."
- Bot maintains resolution state even if reactions are removed and re-added
- Clear visual feedback throughout the resolution process
Bug Fixes
Active Bet Cancellation Fixed
- Fixed critical bug that prevented cancellation of active bets
- Active bets can now be properly cancelled with mutual agreement
- Both emoji (❌) and command (
/bet cancel) methods work correctly - Pending bets still allow instant cancellation by creator
Improvements
Enhanced User Experience
- Automatic emoji addition to active bets for easy resolution
- Clearer status updates during resolution/cancellation process
- Improved bet embed footers with resolution instructions
- Better error messages for invalid actions
Performance Optimizations
- In-memory resolution tracking for faster response times
- Optimized reaction handling to reduce API calls
- More efficient consensus checking
How It Works
Resolving Bets with Emojis
- When a bet becomes active, the bot adds
🅰️ ,🅱️ , and ❌ emojis - Both players click the emoji matching the winning side
- Bot automatically resolves and calculates payouts
- Instant confirmation message with results
Cancelling Active Bets with Emojis
- Both players click the ❌ emoji on an active bet
- Bot confirms both parties agree
- Bet is cancelled with no money changing hands
Traditional Commands Still Available
/bet resolve bet_id:1 winning_side:A- Creates confirmation request/bet cancel bet_id:1- Creates cancellation request- Both players confirm with ✅ reaction
Technical Details
Code Changes
- Updated
commands.jswith enhanced reaction handling - Added
resolutionTrackingMap for state management - New functions:
handleEmojiResolution(),handleEmojiCancellation() - Fixed
handleCancelBet()to properly handle active bet cancellation
Compatibility
- Fully backward compatible with v1.1.0
- No database schema changes
- Existing bets continue to work normally
- All deployment methods (Portable, Docker, Source) supported
Migration Guide
From v1.1.0 to v1.2.0
No breaking changes - just update and restart:
Docker Users
cd RoboBetBot
git pull origin main
docker-compose down
docker-compose build --no-cache
docker-compose up -dPortable Users
Download the new release and replace files (keep your .env and bets.db)
Source Users
git pull origin main
npm install
npm startStatistics
- 3 new emoji reactions for resolution
- 2 resolution methods (emoji and command)
- 0 breaking changes
- 1 critical bug fixed
- 50% less typing required for bet resolution
Known Issues
- Emoji reactions may take a moment to appear on slower connections
- Users must have reaction permissions in the channel
- Emojis must be clicked one at a time (not spam-clicked)
System Requirements
No changes from v1.1.0:
- Node.js 16.9.0+ (Source installation)
- Discord.js v14
- SQLite3
- Docker 20.10+ (Docker deployment)
- Windows 10/11 (Portable version)
Credits
- Emoji resolution system designed and implemented by @yzRobo
- Thanks to the community for testing and feedback
Support
License
GPL-3.0 - Ensuring RoboBetBot remains free and open source forever.
Full Changelog: v1.1.0...v1.2.0
RoboBetBot v1.1.0
RoboBetBot v1.1.0
Docker & NAS Support Release
This release brings comprehensive Docker containerization and native support for NAS devices, making RoboBetBot easier to deploy and manage across all platforms.
What's New
Major Features
Full Docker Support
- Native Docker containerization for cross-platform deployment
- Automated container builds with health monitoring
- Resource management and limits for optimal performance
- Non-root user execution for enhanced security
NAS Device Integration
- GUI-based deployment via Dockge, Portainer, and native NAS interfaces
- Native support for:
- Synology DSM (Docker Package & Container Manager)
- QNAP Container Station
- Unraid (Docker Tab & Compose Manager)
- TrueNAS SCALE (Apps & Dockge)
- OpenMediaVault
- Pre-configured compose files for each platform
New Deployment Options
- Three deployment methods to suit any skill level:
- Portable (Windows) - Zero installation, perfect for sharing
- Docker - Professional deployment for servers and NAS
- Source - Direct installation for developers
- Comprehensive comparison guide to help choose the right method
Docker-Specific Enhancements
Automated Setup
docker-compose.dockge.ymlfor one-click GUI deployment- Auto-clones from GitHub - no file uploads needed
- Self-configuring with just a Discord token
Management Tools
docker.shscript for Linux/Mac with commands:- Build, start, stop, restart containers
- View logs and status
- Automated backup/restore
- Shell access for debugging
- Cross-platform Makefile for consistent commands
Professional Features
- Persistent data volumes for database storage
- Environment-based configuration
- Health checks with auto-restart
- Timezone support for proper logging
- Build optimization with Alpine Linux (smaller images)
Documentation
New Guides
-
DOCKER.md - Complete Docker deployment guide with:
- Platform-specific instructions for all major NAS brands
- Volume path configuration for each system
- Troubleshooting common Docker issues
- Advanced configurations (external DB, multi-bot, Kubernetes)
-
DEPLOYMENT_OPTIONS.md - Comparison of all deployment methods
-
CONTRIBUTING.md - Guidelines for contributors
Enhanced Documentation
- Expanded README with Docker quick start
- Updated setup guide with Docker instructions
- Migration guides between deployment methods
🛠️ Technical Improvements
-
Container Optimization
- Alpine Linux base for minimal size (~100MB)
- Multi-stage builds possible
- Efficient dependency installation
-
Database Flexibility
- Support for DATABASE_PATH environment variable
- Docker volume management
- Easy backup/restore procedures
-
Security Enhancements
- Non-root container execution
- Read-only file system compatibility
- No exposed ports required
Installation
Docker Quick Start
Option 1: Standard Docker Compose
git clone https://github.com/yzRobo/RoboBetBot.git
cd RoboBetBot
cp .env.example .env
# Edit .env with your Discord token
docker-compose up -dOption 2: GUI Deployment (NEW!)
For Dockge/Portainer/NAS users:
- Create new stack in your GUI
- Copy
docker-compose.dockge.ymlcontents - Change
DISCORD_TOKENto your token - Deploy!
No command line or file uploads needed - the container auto-configures itself!
Portable Version (Windows)
Still available and unchanged:
- Download from [Releases](https://github.com/yzRobo/RoboBetBot/releases)
- Run
Setup.batandRunBot.bat
Developer Setup
npm install
npm startDeployment Comparison
| Method | Best For | Setup Time | Technical Skill |
|---|---|---|---|
| Docker (NEW) | NAS, VPS, Servers | 2 minutes | Basic |
| Portable | Windows users, sharing | 1 minute | None |
| Source | Development, customization | 5 minutes | Intermediate |
Platform Support
Newly Supported Platforms
- Synology NAS (DSM 6/7)
- QNAP NAS
- Unraid
- TrueNAS SCALE/CORE
- OpenMediaVault
- Any Docker-capable Linux VPS
- Raspberry Pi (ARM support)
- macOS with Docker Desktop
Existing Support
- Windows 10/11 (Portable)
- Any system with Node.js 16.9+
Migration Guide
From v1.0.0 to v1.1.0
No breaking changes - just new deployment options!
- Database compatible - Your
bets.dbworks across all deployment methods - No code changes - Existing setups continue working
- Optional upgrade - Switch to Docker when convenient
Switching Deployment Methods
# Portable → Docker
Copy bets.db to ./data/bets.db
# Docker → Portable
docker cp robobetbot:/data/bets.db ./bets.db
# Any → Any
Just copy the bets.db file!Bug Fixes
- Fixed potential database path issues in containerized environments
- Improved error handling for missing environment variables
- Better timezone handling for international users
Development
New Scripts & Tools
docker.sh- Docker management scriptMakefile- Cross-platform build commands- Enhanced
build-portable.jswith better error handling
Repository Structure
RoboBetBot/
├── 🆕 Dockerfile # Container definition
├── 🆕 docker-compose.yml # Standard Docker deployment
├── 🆕 docker-compose.dockge.yml # GUI deployment optimized
├── 🆕 docker.sh # Management script
├── 🆕 Makefile # Cross-platform commands
├── 🆕 DOCKER.md # Docker documentation
├── 🆕 DEPLOYMENT_OPTIONS.md # Comparison guide
├── 🆕 CONTRIBUTING.md # Contribution guidelines
├── bot.js # Core bot (unchanged)
├── database.js # Database (Docker-aware)
├── commands.js # Commands (unchanged)
└── scripts/
└── build-portable.js # Portable builder
Known Issues
- First Docker pull takes 2-3 minutes (downloading dependencies)
- Some NAS devices may need manual volume path configuration
- TrueNAS CORE users should use TrueNAS SCALE for easier deployment
What's Next (v1.2.0)
- Web dashboard for statistics
- Docker Hub automated builds
- ARM64 native images
- Backup automation
- Multi-server support in single container
Upgrade Instructions
For Existing Users
Currently using Portable (Windows):
No action needed - continue using as normal, or optionally try Docker
Currently using Source:
git pull origin main
npm install
# Optional: Switch to Docker
docker-compose up -dWant to try Docker:
- Stop current bot
- Copy your
bets.dbto./data/bets.db - Follow Docker quick start above
System Requirements
Docker Deployment (NEW)
- Docker Engine 20.10+ or Docker Desktop
- 100MB disk space
- 128MB RAM
- Any OS with Docker support
Portable Version
- Windows 10/11
- 200MB disk space
- No changes from v1.0.0
Source Installation
- Node.js 16.9.0+
- No changes from v1.0.0
Credits
- Docker implementation and NAS guides by @yzRobo
- Thanks to the community for platform testing
Checksums
Docker-Betting-Bot-Portable-v1.1.0.zip
SHA256: [Will be added after build]
MD5: [Will be added after build]
Docker Image: robobetbot:1.1.0
SHA256: [Will be added after build]
Support
- [Report bugs](https://github.com/yzRobo/RoboBetBot/issues)
- [Docker-specific issues](https://github.com/yzRobo/RoboBetBot/issues/new?labels=docker)
- [NAS setup help](https://github.com/yzRobo/RoboBetBot/issues/new?labels=nas,docker)
License
GPL-3.0 - Ensuring RoboBetBot remains free and open source forever.
Full Changelog: [v1.0.0...v1.1.0](v1.0.0...v1.1.0)
Summary of Changes
- Added complete Docker support
- Added NAS device integration
- Added comprehensive Docker documentation
- Added Docker management tools
- Added GUI deployment option
- Improved security with non-root containers
- No breaking changes - fully backward compatible
RoboBetBot v1.0.0
RoboBetBot v1.0.0
First official release of RoboBetBot - A Discord bot for managing friendly sports betting within your server.
What's New
This is the initial public release featuring a complete betting system with consensus-based resolution, automatic payout calculations, and comprehensive stat tracking.
Features
Core Functionality
- Two-sided betting system with emoji reactions for side selection
- Custom odds support in both American (-110) and decimal (2.0) formats
- Consensus resolution requiring both parties to confirm outcomes
- Automatic calculations for payouts based on odds
- Persistent storage using SQLite database
- Comprehensive stats including win/loss records and profit tracking
Bet Types
- Game Bets - Team vs team with home/away designation
- Player Props - Over/under on player statistics
- Futures - Championship and season-long bets
Commands
/bet create- Create a new bet with custom parameters/bet resolve- Initiate resolution (requires both parties)/bet cancel- Cancel pending or active bets/bets active- View all current bets/bets history- Personal betting history/stats- View betting statistics for any user/leaderboard- Server-wide profit rankings
Downloads
For Users (No Installation Required)
Windows Portable Version: Newest Release
Simply extract and run:
- Run
Setup.batand enter your bot token - Run
RunBot.batto start the bot - No Node.js or technical knowledge required
For Developers
Clone the repository and build from source:
git clone https://github.com/yzRobo/RoboBetBot.git
cd RoboBetBot
npm installInstallation
Quick Start (Portable Version)
- Download the portable ZIP from releases
- Extract to any location
- Run
Setup.batto configure your bot token - Run
RunBot.batto start
Developer Setup
- Clone repository
- Install dependencies:
npm install - Create
.envfile with your Discord bot token - Start bot:
npm start
Discord Bot Setup
Required Permissions
- Send Messages
- Use Application Commands
- Read Messages/View Channels
- Add Reactions
- Manage Messages
- Embed Links
Getting a Bot Token
- Visit Discord Developer Portal
- Create new application
- Go to Bot section
- Copy token for configuration
- Here you can customize the bot how you see fit (Name, bot image, etc.). This is how it will display in discord
Example Usage
Creating a Game Bet
/bet create type:Game amount:50
description:"Bills @ Chiefs MNF"
side_a:"Chiefs -3" side_b:"Bills +3"
odds_a:"-110" odds_b:"-110"
away_team:"Chiefs" home_team:"Bills"
Creating a Player Prop
/bet create type:Prop amount:25
description:"Josh Allen Passing TDs"
side_a:"Over 2.5" side_b:"Under 2.5"
player:"Josh Allen"
System Requirements
Portable Version
- Windows 10 or later
- Internet connection (first run only)
- 200MB free disk space
Development Version
- Node.js 16.9.0 or higher
- Discord.js v14
- SQLite3
Known Issues
- First run of portable version takes 2-3 minutes to download dependencies
- Bot commands may take up to 1 hour to sync globally in Discord
Checksums
Discord-Betting-Bot-Portable.zip
SHA256: [Will be added after build]
MD5: [Will be added after build]
What's Next
Future releases may include:
- Web dashboard for stats viewing
- Season-long competitions
- Parlay betting support
- Auto-resolution via sports APIs
- Custom team emojis
Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
License
GPL-3.0 - See LICENSE for details.
Support
For issues or questions:
Credits
Created by @yzRobo
Full Changelog: This is the first release!