# Agent Instructions for Senator Sperma ## Required Setup - Requires **Python 3.14** - System dependencies: `ffmpeg`, `zbar` library (installed system-wide) - Bot token in `.env` file (copy from `.env.example`) ## Commands - Run bot: `.venv/bin/python main.py` - Type check: `.venv/bin/basedpyright` - Test: `.venv/bin/pytest` ## Architecture - Slash commands defined as cogs in `cogs/*.py` - Discord API uses `discord.ApplicationContext` - Music auto-complete queries copyparty server (`COPYPARTY_URL` config) ## Environment - Copyparty URL for read-only access is COPYPARTY_URL - Copyparty URL for write-only access is COPYPARTY_URL_UPLOAD - Above should be accessed using COPYPARTY_PASSWORD as a cookie - Channel for vclogs and alike is STATUS_CHANNEL_ID - Trigger word for assistant is ASSISTANT_KEYWORD ## Testing - Tests in `tests/cogs/test_*.py` - Uses pytest-asyncio with `asyncio_default_fixture_loop_scope = function` - `conftest.py` provides fixtures for mocking Discord objects - **Slow integration tests** marked with `@pytest.mark.slow` - Test real-world feature usage with longer execution times - Includes: voice session tracking, cron job execution, music playback lifecycle, downloader flow, trigger responses - Run only fast tests: `.venv/bin/pytest -m "not slow"` - Run only slow tests: `.venv/bin/pytest -m slow`