Initial commit: Enhanced IRC bot with duck hunt game
- Added hunt/feed duck mechanics (80% hunt, 20% feed) - Implemented persistent scoring system - Added channel control commands (\!stopducks/\!startducks) - Enhanced duck hunt with wrong action penalties - Organized bot structure with botmain.js as main file - Added comprehensive documentation (README.md) - Included 17 plugins with various games and utilities 🦆 Duck Hunt Features: - Hunt ducks with \!shoot/\!bang (80% of spawns) - Feed ducks with \!feed (20% of spawns) - Persistent scores saved to JSON - Channel-specific controls for #bakedbeans - Reaction time tracking and special achievements 🎮 Other Games: - Casino games (slots, coinflip, hi-lo, scratch cards) - Multiplayer games (pigs, zombie dice, quiplash) - Text generation (babble, conspiracy, drunk historian) - Interactive features (story writing, emojify, combos) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
commit
a3ed25f8dd
39 changed files with 12360 additions and 0 deletions
135
README.md
Normal file
135
README.md
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
# CancerBot - IRC Bot with Plugin System
|
||||
|
||||
An IRC bot for #bakedbeans on irc.libera.chat with a comprehensive plugin system and various games.
|
||||
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
# Install dependencies
|
||||
npm install
|
||||
|
||||
# Run the main bot
|
||||
node botmain.js
|
||||
```
|
||||
|
||||
## Bot Configuration
|
||||
|
||||
- **Server**: irc.libera.chat:6667
|
||||
- **Nickname**: cancerbot
|
||||
- **Channel**: #bakedbeans
|
||||
- **Command Prefix**: !
|
||||
|
||||
## Main Files
|
||||
|
||||
- `botmain.js` - **Main bot file** (run this one)
|
||||
- `complete_irc_bot.js` - Alternative bot without debug features
|
||||
- `bot_template.js` - Template for reference
|
||||
- `plugin_template.js` - Plugin development template
|
||||
|
||||
## Duck Hunt Plugin (Enhanced)
|
||||
|
||||
The duck hunt game has been enhanced with a hunt/feed system for more engaging gameplay.
|
||||
|
||||
### Game Mechanics
|
||||
- **80% Hunt Ducks**: Require `!shoot` or `!bang` to hunt
|
||||
- **20% Feed Ducks**: Require `!feed` to feed
|
||||
- **Persistent Scores**: Scores saved to `plugins/duck_hunt_scores.json`
|
||||
- **Reaction Time**: Tracked for both hunting and feeding
|
||||
- **Wrong Action Penalties**: Using the wrong command makes the duck flee
|
||||
|
||||
### Commands
|
||||
- `!shoot` / `!bang` - Hunt aggressive ducks
|
||||
- `!feed` - Feed hungry ducks
|
||||
- `!duckscore` - Check your score
|
||||
- `!topducks` - View leaderboard
|
||||
- `!duckstats` - Show game statistics
|
||||
- `!stopducks` - Stop duck spawning (bakedbeans only)
|
||||
- `!startducks` - Resume duck spawning (bakedbeans only)
|
||||
|
||||
### Duck Types
|
||||
- **Common**: 🦆 Mallard (1pt), 🦢 Swan (2pts), 🪿 Goose (2pts)
|
||||
- **Rare**: 🐧 Penguin (3pts), 🦜 Parrot (3pts), 🦉 Owl (4pts), 🦅 Eagle (5pts)
|
||||
- **Legendary**: 🏆 Golden Duck (10pts), 💎 Diamond Duck (15pts), 🌟 Cosmic Duck (20pts)
|
||||
|
||||
### Spawn Messages
|
||||
- **Hunt Ducks**: "Quick, !shoot it!", "Someone !shoot it before it escapes!"
|
||||
- **Feed Ducks**: "!feed it some bread!", "It looks hungry, !feed it!"
|
||||
|
||||
## Other Games/Plugins
|
||||
|
||||
### Casino Games (All with persistent scores)
|
||||
- **Coin Flip**: `!flip` - Bet on heads/tails
|
||||
- **Hi-Lo**: `!hilo` - Guess if next card is higher/lower
|
||||
- **Slots**: `!slots` - Spin the slot machine
|
||||
- **Scratch Cards**: `!scratch` - Virtual scratch cards
|
||||
|
||||
### Multiplayer Games
|
||||
- **Pass the Pigs**: `!pigs` - Multiplayer dice game
|
||||
- **Zombie Dice**: `!zombie` - Multiplayer zombie brain collecting
|
||||
- **Quiplash**: `!quiplash` - Answer prompts and vote
|
||||
|
||||
### Text/Chat Plugins
|
||||
- **Babble**: `!babble` - Generate text from learned patterns
|
||||
- **Story**: `!story` - Collaborative story writing
|
||||
- **Emojify**: `!emojify` - Convert text to emojis
|
||||
- **Conspiracy**: `!conspiracy` - Generate conspiracy theories
|
||||
- **Drunk Historian**: `!history` - Historical "facts" with varying sobriety
|
||||
|
||||
### Utility
|
||||
- **Basic**: `!ping`, `!help`, `!time`
|
||||
- **Combo**: Track message combos in channels
|
||||
- **Bot Reply**: Responds to other bots
|
||||
|
||||
## Admin Commands
|
||||
|
||||
- `!reloadplugins` - Reload all plugins (megasconed only)
|
||||
|
||||
## Plugin Development
|
||||
|
||||
See `plugin_template.js` for creating new plugins. Plugins support:
|
||||
- Command registration
|
||||
- Event handling (onMessage, etc.)
|
||||
- Persistent storage
|
||||
- Initialization and cleanup
|
||||
|
||||
## Recent Changes
|
||||
|
||||
### Duck Hunt Enhancements (Latest)
|
||||
- Added hunt/feed mechanic (80% hunt, 20% feed)
|
||||
- New `!feed` command for feeding ducks
|
||||
- Wrong action penalties for immersion
|
||||
- Persistent score storage
|
||||
- Channel control commands (`!stopducks`/`!startducks`)
|
||||
|
||||
### Bot Structure Cleanup
|
||||
- Renamed `debug_bot.js` to `botmain.js` as main bot
|
||||
- Removed Windows Zone.Identifier files
|
||||
- Organized file structure for clarity
|
||||
|
||||
## Technical Notes
|
||||
|
||||
- Uses Node.js with net module for IRC connection
|
||||
- SQLite3 for data persistence in some plugins
|
||||
- Plugin system with hot-reloading capability
|
||||
- Comprehensive error handling and logging
|
||||
- Automatic reconnection on disconnect
|
||||
|
||||
## File Structure
|
||||
|
||||
```
|
||||
cancerbot/
|
||||
├── botmain.js # Main bot file
|
||||
├── complete_irc_bot.js # Alternative bot
|
||||
├── bot_template.js # Bot template
|
||||
├── plugin_template.js # Plugin template
|
||||
├── plugins/ # Plugin directory
|
||||
│ ├── duck_hunt_plugin.js
|
||||
│ ├── coinflip_plugin.js
|
||||
│ ├── [other plugins...]
|
||||
│ ├── duck_hunt_scores.json
|
||||
│ └── [other score files...]
|
||||
├── package.json
|
||||
└── README.md
|
||||
```
|
||||
|
||||
Enjoy your holiday! 🦆🏖️
|
||||
Loading…
Add table
Add a link
Reference in a new issue