# 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! ðŸĶ†ðŸ–ïļ