A fun, production-ready Discord bot featuring casino games, in-server economy, and responsible gaming features.
- Blackjack: Full implementation with dealer AI, hit/stand, insurance
- Roulette: European wheel with multiple bet types (single, dozen, color, etc.)
- Slots: 3-reel slot machine with paytable and jackpot
- Poker: Basic Texas Hold'em scaffold (expandable)
- Bowling: Mini-game with wagering
- Wallet and bank system
- Work, daily, weekly rewards with cooldowns
- Transfer coins between users
- Leaderboard
- Transaction history
- Responsible gaming notices
- Wager limits and cooldowns
- Anti-fraud detection
- Admin controls for moderation
- Age verification (placeholder)
- Async/await throughout
- SQLite for development, PostgreSQL for production
- Docker support
- Comprehensive logging
- Unit tests
- Type hints and documentation
- Python 3.11+
- Discord Bot Token (from Discord Developer Portal)
-
Clone the repository:
git clone https://github.com/yourusername/fun2oosh.git cd fun2oosh
-
Create virtual environment:
python -m venv venv source venv/bin/activate # Linux/Mac # or venv\Scripts\activate # Windows
-
Install dependencies:
pip install -r requirements.txt
-
Configure environment:
cp .env.example .env # Edit .env with your bot token and settings
-
Run the bot:
python bot.py
DISCORD_TOKEN
: Your bot's tokenDATABASE_URL
: Database connection stringOWNER_ID
: Your Discord user ID for admin commandsLOG_LEVEL
: Logging level (INFO, DEBUG, etc.)GUILD_ID
: For faster slash command sync during development
Adjust in .env
:
MIN_BET
: Minimum bet amountMAX_BET
: Maximum bet amountWORK_REWARD
: Coins earned from !workDAILY_REWARD
: Daily reward amountWEEKLY_REWARD
: Weekly reward amount
^balance
- Check your wallet and bank^work
- Earn coins (30 min cooldown)^daily
- Claim daily reward^leaderboard
- Top 10 richest users
^blackjack <bet>
- Start blackjack game^roulette <type> <value> <bet>
- Play roulette^slots <bet>
- Play slots
^add_money <user> <amount>
- Add coins to user^reset_economy
- Reset all economy data
docker build -t fun2oosh .
docker run -d --env-file .env fun2oosh
docker-compose up -d
- Heroku: Set env vars, deploy Python app
- Render: Connect repo, set env vars
- Railway: Similar to Render
- AWS: Use EC2 or Lambda
Default: sqlite+aiosqlite:///fun2oosh.db
Set DATABASE_URL=postgresql+asyncpg://user:pass@host:port/db
- Store tokens and secrets as environment variables
- Use
.env
file locally, never commit - Implement proper error handling
- Monitor for rate limits
- Regular dependency updates
This bot includes responsible gaming features:
- Gambling addiction warnings
- Daily wager limits
- Age verification (implement in production)
- Clear odds and payout information
- Easy opt-out options
- Fork the repository
- Create feature branch
- Add tests for new features
- Ensure code passes linting
- Submit pull request
MIT License - see LICENSE file
- Create issue on GitHub
- Join our Discord server (link in bio)
- Check documentation in
/docs
This bot is for entertainment purposes only. Gambling can be addictive. Please play responsibly. If you need help with gambling addiction, contact professional services.