A comprehensive Discord bot featuring Daggerheart RPG tools and casino games, now available as a ModuleDock-compatible module.
- Advanced Dice Rolling: Hope+Fear system, custom expressions, DC checking
- Multiple Die Sizes: Support for d4, d6, d8, d10, d12, d20
- Secret Rolls: Ephemeral results visible only to roller
- Modifiers & DC: Add modifiers and check against difficulty class
- Blackjack: Play 21 against the dealer with hit/stand mechanics
- Poker: 5-card draw poker with hand evaluation
- Roulette: Full American roulette with all betting options
- Slots: Multi-symbol slot machine with progressive payouts
- Dice: Classic dice betting with multiple bet types
- Baccarat: Player vs Banker vs Tie betting
- War: Simple high-card game
- Coin Flip: Quick heads or tails decision maker
- Status: Check bot operational status and server deployments
- Login: Get dashboard login link
- Clear: Clear character inventory items
This bot is designed to work with the ModuleDock extensible module system. Instead of hosting your own instance, you can install it as a module in any bot using ModuleDock:
- Find a bot with ModuleDock support
- Access the dashboard for your Discord server
- Navigate to Modules section
- Search for "DDT Daggerheart & Gaming Module"
- Click Install and configure settings
See the Module Documentation for detailed information.
If you want to run your own instance:
- Node.js 18+
- npm or yarn
- Discord Bot Token and Application ID
- Cloudflare Workers account (for deployment)
# Clone the repository
git clone https://github.com/Raindancer118/DDT-DiscordBot.git
cd DDT-DiscordBot
# Install dependencies
npm install
# Configure environment
cp .env.example .env
# Edit .env with your tokensCreate a .env file:
DISCORD_TOKEN=your_bot_token_here
DISCORD_PUBLIC_KEY=your_public_key_here
CLIENT_ID=your_application_id_here
GUILD_ID=your_test_guild_id_here # Optional, for guild-specific commandsnpm run registernpm run devnpm run deploy/dh roll [expr] [sides] [mod] [dc] [secret] [animate]- Roll dice with Hope+Fear system
/blackjack [bet]- Play Blackjack/poker [bet]- Play 5-card draw poker/roulette <bet> [amount]- Spin the roulette wheel/slots [bet]- Pull the slot machine/dice <bet> [amount]- Roll dice with betting/baccarat <bet> [amount]- Bet on Player, Banker, or Tie/war [bet]- Play War against the dealer
/coinflip- Flip a coin
/status- Check bot status/login- Get dashboard login link/clear <character_id>- Clear character inventory
This bot is ModuleDock-ready, meaning it can be installed as a module in any Discord bot that supports the ModuleDock system.
- Module ID:
ddt-daggerheart-gaming - Version: 1.1.0
- Author: Raindancer118
- Status: Awaiting verification
All ModuleDock-related files are in the module/ directory:
manifest.json- Module definition and metadataREADME.md- Module user documentationINTEGRATION.md- Developer integration guideVERIFICATION.md- Verification process guideHOSTING.md- Manifest hosting guideicon.svg- Module icon
When installed via ModuleDock, admins can configure:
enable_casino_games- Enable/disable casino commandsenable_daggerheart- Enable/disable RPG toolsdefault_bet_amount- Default bet for casino gamesmax_bet_amount- Maximum bet limit
DDT-DiscordBot/
├── module/ # ModuleDock module files
│ ├── manifest.json # Module definition
│ ├── README.md # Module documentation
│ ├── INTEGRATION.md # Integration guide
│ ├── VERIFICATION.md # Verification guide
│ ├── HOSTING.md # Hosting guide
│ └── icon.svg # Module icon
├── src/
│ ├── commands/ # Command implementations
│ │ ├── dh.js # Daggerheart tools
│ │ ├── blackjack.js # Blackjack game
│ │ ├── poker.js # Poker game
│ │ ├── roulette.js # Roulette game
│ │ ├── slots.js # Slot machine
│ │ ├── dice.js # Dice game
│ │ ├── baccarat.js # Baccarat game
│ │ ├── war.js # War game
│ │ ├── coinflip.js # Coin flip
│ │ └── index.js # Command exports
│ ├── pages/ # Web dashboard pages
│ │ ├── api/ # API endpoints
│ │ ├── dashboard/ # Dashboard UI
│ │ └── index.astro # Home page
│ ├── lib/ # Utility libraries
│ ├── db/ # Database schemas
│ ├── worker.js # Cloudflare Worker entry
│ └── register-commands.js # Command registration
├── public/ # Static assets
├── package.json # Dependencies
└── astro.config.mjs # Astro configuration
- Runtime: Cloudflare Workers
- Framework: Astro (for dashboard)
- Styling: Tailwind CSS
- Discord API: discord.js
- Database: Cloudflare D1 (SQLite)
- Verification: tweetnacl (Ed25519 signatures)
- User Guide: Module README
- Integration Guide: INTEGRATION.md
- Verification Process: VERIFICATION.md
- Hosting Guide: HOSTING.md
- Module must be verified by ModuleDock team
- Cryptographic signature verification
- Code review and security audit required
- Only verified modules can be installed
- Signature verification on all Discord interactions
- Environment variables for sensitive data
- HTTPS required for all API endpoints
- CORS configured appropriately
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
For module updates:
- Update version in
module/manifest.json - Document changes in PR
- Submit for re-verification if needed
[Add your license here - e.g., MIT License]
- Bug Reports: Open an issue
- Feature Requests: Open an issue
- Questions: Discussions
- Built with Astro
- Powered by Cloudflare Workers
- Uses discord.js
- Compatible with ModuleDock
- Bot Status: ✅ Operational
- Module Status: ⏳ Awaiting Verification
- Version: 1.1.0
- Last Updated: 2025-12-26
Made with ❤️ by Raindancer118
For ModuleDock integration questions, see the module documentation.