Skip to content

Releases

RoboBetBot v1.3.0

Choose a tag to compare

@yzRobo yzRobo released this 26 Aug 04:30

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 start

Preserve Existing Bets

# Update to v1.3.0
git pull origin main
# Run migration script
node scripts/migrate-stakes.js
# Restart bot
npm start

Docker/Dockge Users

docker-compose down
git pull origin main
docker-compose build --no-cache
docker-compose up -d

Portable 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_stake and side_b_stake columns 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 updates
  • database.js: Support for stake columns with backward compatibility
  • scripts/migrate-stakes.js: New migration script for existing databases

Full Changelog: v1.2.1...v1.3.0

RoboBetBot v1.2.1

Choose a tag to compare

@yzRobo yzRobo released this 26 Aug 03:25

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 → Start

Portable 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 start

Testing the Fix

  1. Create a new bet
  2. As the creator, you should be able to click one side emoji
  3. For prop bets, look for the new ⬆️ ⬇️ emojis
  4. 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

Choose a tag to compare

@yzRobo yzRobo released this 25 Aug 20:57

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:

  1. Emoji Method (NEW) - Click emojis directly on the bet message
  2. Command Method - Use traditional /bet resolve or /bet cancel commands
  • 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

  1. When a bet becomes active, the bot adds 🅰️, 🅱️, and ❌ emojis
  2. Both players click the emoji matching the winning side
  3. Bot automatically resolves and calculates payouts
  4. Instant confirmation message with results

Cancelling Active Bets with Emojis

  1. Both players click the ❌ emoji on an active bet
  2. Bot confirms both parties agree
  3. 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.js with enhanced reaction handling
  • Added resolutionTracking Map 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 -d

Portable Users

Download the new release and replace files (keep your .env and bets.db)

Source Users

git pull origin main
npm install
npm start

Statistics

  • 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

Choose a tag to compare

@yzRobo yzRobo released this 25 Aug 19:51

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:
    1. Portable (Windows) - Zero installation, perfect for sharing
    2. Docker - Professional deployment for servers and NAS
    3. Source - Direct installation for developers
  • Comprehensive comparison guide to help choose the right method

Docker-Specific Enhancements

Automated Setup

  • docker-compose.dockge.yml for one-click GUI deployment
  • Auto-clones from GitHub - no file uploads needed
  • Self-configuring with just a Discord token

Management Tools

  • docker.sh script 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 -d

Option 2: GUI Deployment (NEW!)

For Dockge/Portainer/NAS users:

  1. Create new stack in your GUI
  2. Copy docker-compose.dockge.yml contents
  3. Change DISCORD_TOKEN to your token
  4. Deploy!

No command line or file uploads needed - the container auto-configures itself!

Portable Version (Windows)

Still available and unchanged:

  1. Download from [Releases](https://github.com/yzRobo/RoboBetBot/releases)
  2. Run Setup.bat and RunBot.bat

Developer Setup

npm install
npm start

Deployment 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.db works 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 script
  • Makefile - Cross-platform build commands
  • Enhanced build-portable.js with 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 -d

Want to try Docker:

  1. Stop current bot
  2. Copy your bets.db to ./data/bets.db
  3. 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

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

Choose a tag to compare

@yzRobo yzRobo released this 25 Aug 18:34

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:

  1. Run Setup.bat and enter your bot token
  2. Run RunBot.bat to start the bot
  3. 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 install

Installation

Quick Start (Portable Version)

  1. Download the portable ZIP from releases
  2. Extract to any location
  3. Run Setup.bat to configure your bot token
  4. Run RunBot.bat to start

Developer Setup

  1. Clone repository
  2. Install dependencies: npm install
  3. Create .env file with your Discord bot token
  4. 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

  1. Visit Discord Developer Portal
  2. Create new application
  3. Go to Bot section
  4. Copy token for configuration
  5. 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!