aboutsummaryrefslogtreecommitdiffstats
path: root/AGENTS.md
blob: 5f62ec3116d8db571ff0cc91de8d83ab9cda6e6a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# 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`