A powerful Discord bot that provides AI-powered chat completions and image generation using free, open-source AI services.
- 💬 AI Chat - Ask questions and get intelligent responses using
/ask
command - 🎨 Image Generation - Create AI-generated images using
/image
command - 🌶️ Roast Generator - Get hilarious AI-generated roasts with adjustable spice levels
- 💪 Hype Man - Hype up your bros with legendary AI compliments
- ⚡ Fast & Free - Powered by Groq (chat) and Pollinations.ai (images)
- 📘 TypeScript - Fully typed codebase for better development experience
- Groq - Lightning-fast chat completions with Llama 3.3 70B model
- Pollinations.ai - Free image generation with Stable Diffusion
- Node.js >= 18
- Discord Bot Token
- Groq API Key (free from console.groq.com)
- Go to Discord Developer Portal
- Create a new application
- Navigate to the Bot tab and click "Add Bot"
- Get your bot token (click "Reset Token" to view it)
- Enable Developer Mode in Discord (User Settings → Advanced → Developer Mode)
- Right-click your server icon and "Copy Server ID" (this is your GUILD_ID)
- Groq API Key: Sign up at console.groq.com and create an API key
- Discord CLIENT_ID: Found in the "General Information" tab of your Discord application
Create a .env
file in the project root with:
CLIENT_TOKEN=your_discord_bot_token
CLIENT_ID=your_discord_application_id
GUILD_ID=your_discord_server_id
GROQ_API_KEY=your_groq_api_key
npm install
# or
yarn install
npm run build
npm run deploy-commands
npm start
Or for development with auto-reload:
npm run dev
Once the bot is running and added to your server, you can use:
Ask the AI a question and get an intelligent response
/ask What is the capital of France?
Generate an AI image based on your description
/image a cat riding a skateboard in space
Get roasted by AI or roast someone else! Choose your spice level:
- 🌶️ Mild - Friendly and playful
- 🌶️🌶️ Medium - Witty and clever (default)
- 🌶️🌶️🌶️ Spicy - R-RATED Absolutely savage and ruthless
⚠️
/roast @friend style:spicy
/roast style:mild
Hype up your bros with AI-generated compliments! Choose your style:
- 💪 Bro - Casual and supportive, best friend energy (default)
- 🔥 Legend - Over-the-top legendary hype
- 😤 Savage - Respectful but aggressive, tough love
/compliment @friend style:legend
/compliment style:savage
- Build TypeScript:
npm run build
- Dev mode (auto-reload):
npm run dev
- Deploy commands:
npm run deploy-commands
- Delete commands:
npm run delete-commands
src/
├── commands/ # Slash commands
│ ├── ask.ts # AI chat command
│ ├── generateImage.ts # Image generation command
│ ├── roast.ts # Roast generator command
│ └── compliment.ts # Compliment generator command
├── ai.ts # AI service functions
├── groq.ts # Groq API configuration
├── types.ts # TypeScript type definitions
├── index.ts # Main bot entry point
├── deploy-commands.ts # Command deployment script
└── delete-commands.ts # Command deletion script
- All AI services used are completely free
- Image generation is instant (no API key required for Pollinations)
- Groq provides extremely fast responses with state-of-the-art models
- The bot only responds to slash commands in servers where it's deployed
Jluis Avalos
ISC
Enjoy your AI-powered Discord bot! 🎉