# Xander Bot A professional, feature-rich Discord bot powered by AI (NavyAI GPT-4o) for translation, explanations, image generation, text analysis, notes, reminders, matching, and more. Xander is designed for both servers and DMs, with a beautiful interactive help system and robust user experience. --- ## ✨ Features - **AI Utilities:** Translation, explanations, text analysis, emojify, AI roasts, image generation, and moreβ€”all powered by NavyAI (OpenAI-compatible, GPT-4o). - **Notes & Reminders:** Save private notes and set reminders with natural language time parsing. - **Calculator:** Safe math evaluation using MathJS. - **Fun & Engagement:** Ship command (compatibility, OTP, AI-generated reasons), styled replies, and more. - **Conversation Memory:** Context-aware AI chat with per-user history. - **Advanced Help System:** Interactive, categorized help menu with command details and usage examples. - **Professional UX:** Clean embeds, emoji accents, ephemeral replies, and a welcoming onboarding experience. - **Logging:** All command usage, errors, and DMs are logged via Discord webhook (optional). - **Admin System:** Powerful admin commands for DMs, user management, broadcasts, blacklisting, and more. - **Vibe & Matching:** Fill out a vibe profile, find compatible users, and connect with matches. --- ## πŸ“ What are "Vibe" and "Match"? - **Vibe:** Your vibe is your social/personality profile, set up using `/vibeform`. It includes your age range, core vibe, music mood, energy level, Discord usage, social battery, what you're looking for, and chaos quotient. - **Match:** Matching is the process of finding users with a similar vibe profile. When you use `/findmatch`, the bot compares your answers to others, calculates a compatibility percentage, and lists all users with 80%+ compatibility (highest to lowest). Both users are notified if a strong match is found. Use `/reveal` to connect with your top match. --- ## πŸ› οΈ Commands ### AI & Utility - `/translate` β€” Translate text to English - `/explain` β€” Explain text in simple terms - `/analyze` β€” Analyze text for sentiment, topics, and tone - `/emojify` β€” Convert text to expressive emoji-filled speech - `/airoast` β€” AI-generated roast for a user - `/imagine` β€” Generate an image from a prompt - `/replyto` β€” Styled AI reply to a message (formal, roast, poetic, sarcastic, casual) - `/ask` β€” Ask Xander anything (context-aware, per-user chat history) - `/continue` β€” Continue your last conversation with the AI - `/resetai` β€” Reset your conversation history with the AI - `/calc` β€” Evaluate a mathematical expression ### Notes & Reminders - `/note` β€” Save a private note - `/remind` β€” Set a private reminder (natural language time parsing) - `/listnotes` β€” List all your notes and reminders - `/clearnotes` β€” Delete all your notes and reminders ### Vibe, Matching & Social - `/vibeform` β€” Fill out your vibe profile (DM-only) - `/editvibe` β€” Edit your vibe profile - `/profile` β€” View your vibe profile and match stats - `/findmatch` β€” Find all users with 80%+ vibe compatibility (DM-only) - `/reveal` β€” Reveal and connect with your top match - `/matchstats` β€” View your matching statistics - `/friend` β€” Send or accept friend requests - `/ship` β€” See compatibility between two users (with chaos mode) - `/shipfriend` β€” Ship yourself with a friend - `/ghostmode` β€” Hide your profile from matching - `/reveal` β€” Reveal your match after finding one - `/matchstats` β€” View your match history and stats - `/friend` β€” Manage friend requests and connections - `/findmatch` β€” Find your best vibe matches - `/editvibe` β€” Edit your vibe profile - `/profile` β€” View your profile and stats ### General & Info - `/help` β€” Interactive help menu (with dropdown navigation) - `/start` β€” Welcome and onboarding message - `/whoami` β€” Show your Discord user info ### Admin (admin-only) - `/admin addadmin ` β€” Add a new admin (mention, username, or ID) - `/admin removeadmin ` β€” Remove an admin - `/admin listadmins` β€” List all admins - `/admin dm ` β€” DM a user as the bot - `/admin broadcast ` β€” DM all users with a message - `/admin userinfo ` β€” Show info for any user (profile, admin, blacklist) - `/admin removeprofile ` β€” Remove a user's vibe profile - `/admin forcematch ` β€” Force match two users and notify them - `/admin stats` β€” Show bot stats (profiles, admins, blacklisted) - `/admin reloadcommands` β€” Reload all slash commands - `/admin blacklist add/remove/list ` β€” Manage the blacklist - `/admin say ` β€” Send a message as the bot in any channel --- ## πŸš€ Getting Started 1. **Clone or download this repository.** 2. **Install dependencies:** ```bash npm install ``` 3. **Create a `.env` file** in the project root: ```env DISCORD_TOKEN=your-discord-bot-token DISCORD_CLIENT_ID=your-discord-client-id OPENAI_API_KEY=your-navyai-api-key LOG_WEBHOOK_URL=your-discord-logging-webhook-url (optional) MATCH_WEBHOOK_URL=your-match-logging-webhook-url (for vibeform/findmatch logs) ``` > **Note:** All sensitive URLs, webhooks, and tokens should be stored in `.env` and never hardcoded in the codebase. 4. **Start the bot:** ```bash npm start ``` --- ## 🌐 Free Hosting Options - [Railway](https://railway.app/) (recommended) - [Replit](https://replit.com/) - [Glitch](https://glitch.com/) - [Render](https://render.com/) --- ## βš™οΈ Environment Variables - `DISCORD_TOKEN` β€” Your Discord bot token - `DISCORD_CLIENT_ID` β€” Your bot's client ID - `OPENAI_API_KEY` β€” NavyAI API key (for all AI features) - `LOG_WEBHOOK_URL` β€” (Optional) Discord webhook URL for logging - `MATCH_WEBHOOK_URL` β€” (Optional) Discord webhook URL for match/vibeform logs --- ## πŸ“ Usage & Tips - **All commands work in both servers and DMs.** - **Ephemeral replies** keep responses private and clean. - **Use `/help`** for an interactive, categorized command menu with details and usage examples. - **AI features** require a valid NavyAI (OpenAI-compatible) API key. - **Notes and reminders** are stored in-memory (reset on restart). - **Logging** is optional but recommended for monitoring usage and errors. - **Admin commands** are powerfulβ€”use with care! --- ## πŸ“„ License MIT