Skip to content

An AI-powered Discord bot featuring intelligent chat responses via Groq's Llama 3.3 and free image generation using Pollinations.ai. Enhance your Discord server with fast, unlimited AI interactions using /ask and /image commands - completely free.

Notifications You must be signed in to change notification settings

avalos010/AI-Discord-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Discord Bot

A powerful Discord bot that provides AI-powered chat completions and image generation using free, open-source AI services.

✨ Features

  • 💬 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

🤖 AI Services Used

  • Groq - Lightning-fast chat completions with Llama 3.3 70B model
  • Pollinations.ai - Free image generation with Stable Diffusion

📋 Requirements

🚀 Installation

1. Discord Setup

  1. Go to Discord Developer Portal
  2. Create a new application
  3. Navigate to the Bot tab and click "Add Bot"
  4. Get your bot token (click "Reset Token" to view it)
  5. Enable Developer Mode in Discord (User Settings → Advanced → Developer Mode)
  6. Right-click your server icon and "Copy Server ID" (this is your GUILD_ID)

2. Get API Keys

  • 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

3. Environment Setup

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

4. Install Dependencies

npm install
# or
yarn install

5. Build the Project

npm run build

6. Deploy Commands

npm run deploy-commands

7. Start the Bot

npm start

Or for development with auto-reload:

npm run dev

📖 Usage

Once the bot is running and added to your server, you can use:

/ask [question]

Ask the AI a question and get an intelligent response

/ask What is the capital of France?

/image [description]

Generate an AI image based on your description

/image a cat riding a skateboard in space

/roast [target] [style]

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

/compliment [target] [style]

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

🛠️ Development

  • Build TypeScript: npm run build
  • Dev mode (auto-reload): npm run dev
  • Deploy commands: npm run deploy-commands
  • Delete commands: npm run delete-commands

📂 Project Structure

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

📝 Notes

  • 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

👤 Author

Jluis Avalos

📄 License

ISC


Enjoy your AI-powered Discord bot! 🎉

About

An AI-powered Discord bot featuring intelligent chat responses via Groq's Llama 3.3 and free image generation using Pollinations.ai. Enhance your Discord server with fast, unlimited AI interactions using /ask and /image commands - completely free.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published