diff options
| author | salmonik <raisersoft@proton.me> | 2026-04-18 00:24:50 +0200 |
|---|---|---|
| committer | salmonik <raisersoft@proton.me> | 2026-04-18 00:24:50 +0200 |
| commit | a2b5b10625126b7e98643af9fe40569c9e004047 (patch) | |
| tree | 2b59a929d068bc28bbc21e8c8d8836e4d29270c0 /README.md | |
| parent | add mathematical plotting (diff) | |
| download | senator-sperma-a2b5b10625126b7e98643af9fe40569c9e004047.tar.gz senator-sperma-a2b5b10625126b7e98643af9fe40569c9e004047.zip | |
refactor + preparing bot for public use
Signed-off-by: salmonik <raisersoft@proton.me>
Diffstat (limited to '')
| -rw-r--r-- | README.md | 94 |
1 files changed, 92 insertions, 2 deletions
| @@ -1,3 +1,93 @@ | |||
| 1 | not modulable (yet) bot made for shits and giggles for me and my friends | 1 | # Senator Sperma |
| 2 | 2 | ||
| 3 | use python 3.13.12, since py-cord DOES NOT support 3.14 yet \ No newline at end of file | 3 | A Discord bot with music playback, TTS, web search, and utility commands. |
| 4 | |||
| 5 | Requires Python 3.13 (py-cord doesn't support 3.14 yet). | ||
| 6 | |||
| 7 | ## Setup | ||
| 8 | |||
| 9 | ### 1. Clone & Create Virtual Environment | ||
| 10 | |||
| 11 | ```bash | ||
| 12 | git clone https://codeberg.org/salmonik/senator-sperma | ||
| 13 | cd senator-sperma | ||
| 14 | python -m venv .venv | ||
| 15 | source .venv/bin/activate # Linux/macOS | ||
| 16 | # or .venv\Scripts\activate # Windows | ||
| 17 | ``` | ||
| 18 | |||
| 19 | ### 2. Install Dependencies | ||
| 20 | |||
| 21 | ```bash | ||
| 22 | pip install -r requirements.txt | ||
| 23 | ``` | ||
| 24 | |||
| 25 | You also need `ffmpeg` and `zbar` library and installed system-wide | ||
| 26 | |||
| 27 | ### 3. Create .env File | ||
| 28 | |||
| 29 | Create a `.env` file in the project root: | ||
| 30 | |||
| 31 | ```bash | ||
| 32 | cp .env.example .env | ||
| 33 | ``` | ||
| 34 | |||
| 35 | Edit `.env` with your credentials: | ||
| 36 | |||
| 37 | ```env | ||
| 38 | # Required | ||
| 39 | TOKEN=your_discord_bot_token | ||
| 40 | |||
| 41 | # Optional - Bot Configuration | ||
| 42 | STATUS_CHANNEL_ID=123456789012345678 # Channel for startup message | ||
| 43 | ASSISTANT_KEYWORD=jarvis # Keyword to trigger AI assistant | ||
| 44 | |||
| 45 | # Optional - File Server (for music /search commands) | ||
| 46 | COPYPARTY_URL=http://localhost:8080 | ||
| 47 | COPYPARTY_PASSWORD=your_password | ||
| 48 | |||
| 49 | # Optional - AI commands | ||
| 50 | OPENROUTER_API_KEY= | ||
| 51 | ``` | ||
| 52 | |||
| 53 | ### 6. Run the Bot | ||
| 54 | |||
| 55 | ```bash | ||
| 56 | python main.py | ||
| 57 | ``` | ||
| 58 | |||
| 59 | ## Configuration | ||
| 60 | |||
| 61 | All settings are optional - defaults are provided if not set. | ||
| 62 | |||
| 63 | | Variable | Description | Default | | ||
| 64 | |---------|-------------|---------| | ||
| 65 | | `TOKEN` | Discord bot token | (required) | | ||
| 66 | | `STATUS_CHANNEL_ID` | Channel for startup message | none | | ||
| 67 | | `ASSISTANT_KEYWORD` | Keyword to trigger AI assistant | `jarvis` | | ||
| 68 | | `COPYPARTY_URL` | File server base URL | `http://localhost:8080` | | ||
| 69 | | `COPYPARTY_PASSWORD` | File server password | none | | ||
| 70 | | `OPENROUTER_API_KEY` | AI API key (for /senator command) | none | | ||
| 71 | |||
| 72 | ## Commands | ||
| 73 | |||
| 74 | ### Music | ||
| 75 | - `/play` - Play music from file server or an internet audio stream | ||
| 76 | - `/stop` - Stop playback | ||
| 77 | - `/join` - Join voice channel | ||
| 78 | - `/loop` - Loop current track | ||
| 79 | |||
| 80 | ### Utility | ||
| 81 | - `/search` - Search files on server | ||
| 82 | - `/web` - DuckDuckGo search | ||
| 83 | - `/download` - Download video/audio | ||
| 84 | - `/tts` - Text to speech | ||
| 85 | - `/qr_koduj` / `qr_dekoduj` - QR encode/decode | ||
| 86 | - `/funkcja` - Math plot | ||
| 87 | - `/kompresja` - Compress images | ||
| 88 | - `/konwersja` - Convert audio/video | ||
| 89 | |||
| 90 | ## Dependencies | ||
| 91 | |||
| 92 | - `ffmpeg` - System-wide audio processing | ||
| 93 | - `py-cord` - Discord library (due to instable nature of discord's voice features, py-cord has to be installed directly from git) | ||
