From cd28bb6d990de756d9d515a2910d4430205118ef Mon Sep 17 00:00:00 2001 From: Xargana Date: Sun, 13 Jul 2025 23:59:50 +0300 Subject: [PATCH] added more ai slop --- AGENT.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 AGENT.md diff --git a/AGENT.md b/AGENT.md new file mode 100644 index 0000000..ed611e3 --- /dev/null +++ b/AGENT.md @@ -0,0 +1,27 @@ +# Discord Data Collector - Agent Guide + +## Commands +- **Setup**: `python setup.py` - Install dependencies and create config files +- **Run Main**: `python main.py` - Start Discord data collector +- **CLI Tools**: `python cli.py [command]` - Available: export, stats, search, backup, cleanup, test +- **Test Imports**: `python test_imports.py` - Verify all dependencies work +- **Install Dependencies**: `pip install -r requirements.txt` + +## Architecture +- **Entry Points**: `main.py` (main app), `cli.py` (CLI tools), `setup.py` (installation) +- **Core Modules**: + - `src/client.py` - Discord client implementation with data collection + - `src/database.py` - MariaDB database manager with UserData dataclass + - `src/config.py` - TOML/env configuration management + - `src/rate_limiter.py` - API rate limiting + - `src/logger.py` - Logging setup +- **Data Storage**: JSON files in `data/` directory, backups in `data/backups/` +- **Configuration**: `config.toml` for app settings, `.env` for Discord token + +## Code Style +- **Python**: 3.8+ required, async/await patterns throughout +- **Imports**: Standard library first, third-party, then local (`from .module import Class`) +- **Error Handling**: Comprehensive try/catch with logging, graceful degradation +- **Naming**: snake_case for variables/functions, PascalCase for classes +- **Types**: Type hints required (`typing` module), dataclasses for data structures +- **Async**: All I/O operations use async/await, proper cleanup in finally blocks