# AI Discord Bot ## πŸ‘€ What It Is A self-hosted, always-online Discord friend that feels like a fun, social member of the group β€” not a bot. Its job is to stimulate conversations, keep things lighthearted, and make the server feel alive, even during quiet hours. 🧠 Primary Goals * Boost server engagement organically * Act like a real person with jokes, roasts, and casual banter * Share daily messages and eventually auto-post memes * Be customizable, self-hostable, and monetizable via hosting ## ✨ Core Vibes * Feels like a homie, not a bot * Casual, sometimes spicy, often funny * Always online and paying attention * Posts stuff like: * β€œ@everyone y’all still alive or is this a ghost town? πŸ‘»β€ * β€œNew meme dropped: [image] πŸ”₯” ## πŸ”₯ Updated Feature Focus * !chat β†’ Casual convos with LLM * !roast β†’ Roast your friends * Scheduled daily messages (sassy, motivational, or chaotic) * Future: Meme hunting & posting (from Reddit, X, Discord meme pages, etc.) ## πŸ’‘ Naming Ideas (More Intuitive & Fun) | **Name** | **Vibe** | |-------------------|----------------------------------| | **ServerMate** | Feels social + simple | | **PartyBot** | For fun-focused servers | | **MemeBoi / MemeGal** | If meme-focused | | **BanterBot** | Pure vibes and chaos | | **ChatCrew** | Feels like a squad member | | **VibeCheck** | Funny, catchy, modern | | **HomieBot** | Friendly + clear purpose | | **PingPal** | Low-key but memorable | | **Instigator** | Edgy, fun, accurate | ## πŸ› οΈ AlphaBot MVP Build Schedule A structured build plan for developing and deploying the AlphaBot Discord companion. --- ### βœ… ~~Day 1 – Core Bot Setup~~ - [x] Create Discord bot in Developer Portal - [x] Enable Message Content Intent - [x] Set up `.env` with token - [x] Write `bot.py` with basic `!ping` command - [x] Invite bot to server and confirm it replies --- ### πŸ”„ ~~Day 2 – AI Integration~~ - [x] Write `ai.py` to connect to Ollama/OpenAI - [x] Set up API call + prompt formatting - [x] Add `!chat` command to relay messages - [x] Create `.env` key for `OLLAMA_API_URL` --- ### 🎭 ~~Day 3 – Persona System (Updated)~~ > Goal: Create a dynamic personality engine using a JSON file for flexible identity control. - [x] Replace hardcoded `PERSONALITY` with a JSON-based persona profile - [x] Create `persona.json` to store: - Bot name - Emoji - Style prefix - Prompt injection - [x] Update `personality.py` to read from `persona.json` - [x] Style all AI replies using the loaded persona - [x] Add `!setpersona ""` command - Updates `persona.json` dynamically from a user-provided string - (Optional) Sets bot name using Discord API - [x] **Test live personality switching via command** - Not working. Personality is being loaded but it doesnt actually work ![Delta Lives Screenshot](docs/images/delta-lives.png) πŸ“ *This unlocks full customization without editing code or restarting the bot.* --- ### πŸ”₯ ~~Day 4 – Roast Command~~ - [x] Build `!roast @user` with AI-generated replies - [x] Style roast output with selected personality - [x] Add cooldown to prevent spam (optional) - [ ] Fix Emojis (optional) - Emojis from the settings.yml file are broken. Please fix --- ### πŸ•’ Day 5b – AI Scheduled Messages & Smarter Posting 🧠 > Goal: Let Delta post her own AI-generated chaos on a schedule, instead of just scripted messages. #### βœ… Core Features - [ ] Replace static messages in `scheduler.py` with AI-generated ones via `get_ai_response()` - Use prompt like: *β€œPost something sassy, attention-grabbing, or chaotic to wake up the server.”* - Maintain current persona system for tone consistency - [ ] Add `settings.yml` option to control post mode: - `mode: preset` – static messages only - `mode: ai` – generate new message via LLM - `mode: mixed` – random chance between the two - [ ] Log each scheduled post and mode used for debugging --- #### βš™οΈ Probabilistic Scheduler (Mode 2 – Optional) > Post when it feels "natural" – low chance at first, rising over time. - [ ] Add `probabilistic_scheduler.py` or integrate into `scheduler.py` - [ ] Configurable parameters: - `start_chance: 0.05` (5% per hour) - `increase_per_hour: 0.05` - `decay_on_post: 0.02` - [ ] Reset chance after post, store `last_post_time` --- #### πŸ’€ Inactivity-Aware Scheduler (Mode 3 – Stretch Goal) > Posts when the **server** or a **user** has been inactive for too long. - [ ] Monitor `message.created_at` timestamps per channel or user - [ ] After `X minutes` of silence, apply probabilistic logic to post - [ ] Configurable thresholds in `settings.yml` --- ### πŸ›  Example: settings.yml Additions ```yaml scheduler: mode: ai # Options: preset, ai, mixed interval_minutes: 60 probabilistic: enabled: false start_chance: 0.05 increase_per_hour: 0.05 decay_on_post: 0.02 inactivity: enabled: false threshold_minutes: 120 ``` --- ### 🐳 Day 6 – Dockerization - [ ] Write `Dockerfile` and `docker-compose.yml` - [ ] Test local build and `.env` passthrough - [ ] Optional: containerize Ollama model if running locally --- ### πŸ’° Day 7+ – Monetization Prep (Optional) - [ ] Add donation/promo message in daily post - [ ] Plan hosting model for non-technical users - [ ] Write self-host instructions in `README.md` --- ### 🧬 Final Day – Delta Modelfile Integration > Goal: Make Delta self-contained by baking her personality directly into an Ollama Modelfile. This final step removes the need for runtime prompt injection by turning Delta into her **own model** using Ollama’s custom model system. #### βœ… Tasks - [ ] Create a `Modelfile` for Delta inside `models/delta/` - [ ] Set `FROM llama3` or other base model - [ ] Add personality using the `SYSTEM` directive - [ ] Tune parameters: - `temperature` for flair (suggested: `0.85`) - `num_ctx` for longer memory (suggested: `4096`) - `stop` tokens like `User:` to avoid rambling - [ ] Define a conversation `TEMPLATE` that ensures in-character replies - [ ] Build the model: ```bash ollama create delta -f ./models/delta/Modelfile --- ### 🎨 Polish & Bonus features - [ ] Bot appears on the server like a "user" (ability to @delta instead of "!chat") - helps the "sell" the idea to others that the bot is a "friend" - All user interactions apply to the bot so other users dont need to remmember special commands - [ ] Have the bot be content aware - pulls the existing conversation and talks about stuff that is inline with the topics - [ ] Give bot ability to react to mesages like users would - adds a personal touch and helps sell the idea of it being your "friend" more - does need some sort of content awareness - [ ] Bot can be given some power to change the server a bit - keeps thing fresh, makes it so that there is some change happening in servers - the idea being it makes the bot more unique by providing more tailored experiences - [ ] Bot is user aware - usernames are passed to the bot along side the users prompt - [ ] Image interpretation - bot can read images like GPT this allows for more personalised interactions - [ ] Web usage - Bot can search the web like GPT or OpenWebUI - Opens up a ton of interactivity for memes, media discussion, an be easily integrated with multiple platforms *Progress last updated: May 8, 2025*