# Cheatsheet ## Quick Commands ```bash make install # Setup venv + install make test # Run tests make lint # Lint with ruff make run # Start bot make link # Symlink to ~/.local/bin derp -c config.toml # Run with custom config derp -v # Verbose/debug mode ``` ## Bot Commands ``` !ping # Pong !help # List commands !help # Command help !version # Bot version !echo # Echo text back ``` ## Plugin Template ```python from derp.plugin import command, event @command("name", help="Description") async def cmd_name(bot, message): text = message.text.split(None, 1) await bot.reply(message, "response") @event("JOIN") async def on_join(bot, message): await bot.send(message.target, f"Hi {message.nick}") ``` ## Message Object ``` msg.nick # Sender nick msg.target # Channel or nick msg.text # Message body msg.is_channel # True if channel msg.prefix # nick!user@host msg.command # PRIVMSG, JOIN, etc. msg.params # All params list ``` ## Config Locations ``` 1. --config PATH # CLI flag 2. ./config/derp.toml # Project dir 3. ~/.config/derp/derp.toml # User config 4. Built-in defaults # Fallback ```