Blackjack
!blackjack
A fully interactive blackjack card game where users bet currency to play against the dealer. Features real-time hit/stand decisions, realistic card distribution, automatic timeout, and cooldown protection.
Commands
| Command | Description |
|---|---|
!blackjack [bet] |
Start a new blackjack game with your bet amount |
!blackjack hit |
Draw another card (also: !blackjack h) |
!blackjack stand |
Stand with current hand, dealer plays (also: !blackjack s) |
Features
- Interactive Gameplay - Players control their hand with hit/stand commands
- 10-Second Timer - Auto-stands if player doesn't respond within 10 seconds
- Instant 21 Win - Automatically stands when hitting exactly 21
- Realistic Card Distribution - Simulates proper 52-card deck probabilities
- Smart Dealer AI - Dealer stands at 16 (reduced bust rate)
- Dealer Visibility - Shows each card dealer draws with running totals
- Proper Card Display - Shows A, J, Q, K for face cards
- Soft/Hard Ace Handling - Aces count as 11 or 1 automatically
- Cooldown System - Prevents spam with configurable cooldown timer
- Discord Logging - Tracks all games, wins, losses, and dealer bust rates
Configuration
Set in ConfigSetup.cs:
| Variable | Default | Description |
|---|---|---|
config_blackjack_min_bet |
25 | Minimum bet amount |
config_blackjack_max_bet |
500 | Maximum bet amount |
config_blackjack_win_mult |
2 | Standard win multiplier |
config_blackjack_cooldown_seconds |
30 | Cooldown between games |
How It Works
Starting a Game
- User runs
!blackjack [bet]with amount between min and max - Command checks cooldown (if recently played, shows time remaining)
- Command validates bet amount and checks user balance
- Bet is deducted from user balance
- Player draws 2 cards, dealer draws 2 cards (only 1 shown)
- If player has 21 (blackjack), auto-wins with 2.5x payout
- Otherwise, player has 10 seconds to choose hit or stand
Game Outcomes
| Outcome | Payout |
|---|---|
| Natural Blackjack (21 on first 2 cards) | 2.5x payout |
| Player Bust (over 21) | Lose bet |
| Dealer Bust (over 21) | Win at 2x multiplier |
| Player beats Dealer | Win at 2x multiplier |
| Push (tie) | Bet returned |
| Dealer beats Player | Lose bet |
Card Values
| Card | Value |
|---|---|
| Ace (A) | 11 or 1 (automatically adjusts to prevent bust) |
| 2-9 | Face value |
| 10, J, Q, K | 10 points |
Example Gameplay
Starting a Game
User:
Bot:
Hitting
User:
Bot:
Perfect 21
User:
Bot:
Winning
User:
Bot:
Bot:
Installation
⚠
Prerequisite: You must run ConfigSetup.cs first before installing this command.
Create a new C# action in StreamerBot
Go to Actions → Add → Create new action
Copy the command code
Copy it below and paste it into the action's Execute C# Code sub-action, or download the file.
Loading the code…
Set the trigger
Add a chat command trigger with !blackjack
Test in chat
Try the command to verify it works!