Skip to content

Nuu-maan/Discord-AI-Assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord AI Assistant

A clean, efficient Discord bot that provides AI-powered responses using OpenRouter's API. The bot responds to mentions and direct messages with natural language processing capabilities.

Author

Features

  • 🤖 AI-powered responses using OpenRouter's API
  • 💬 Natural conversation through mentions and DMs
  • 🎨 Clean, minimal embed-based responses
  • ⚡ Fast and efficient response handling
  • 🔒 Secure configuration using environment variables

Tech Stack

  • Python 3.8+
  • discord.py - Modern Discord API wrapper
  • OpenRouter API - AI model access
  • python-dotenv - Environment variable management
  • aiohttp - Async HTTP client

Setup

  1. Clone this repository:
git clone https://github.com/Nuu-maan/Discord-AI-Assistant.git
cd Discord-AI-Assistant
  1. Install dependencies:
pip install -r requirements.txt
  1. Create a .env file in the root directory:
DISCORD_TOKEN=your_discord_bot_token
OPENROUTER_API_KEY=your_openrouter_api_key
  1. Get your API keys:

  2. Run the bot:

python bot.py

Usage

Simply mention the bot or send it a direct message to start a conversation:

@AI Assistant What's the weather like?

The bot will respond with a clean, embed-formatted message.

Project Structure

discord-chatter/
├── bot.py              # Main bot file
├── utils/
│   └── ai_utils.py     # AI API interactions
├── .env               # Environment variables
├── .gitignore         # Git ignore file
├── README.md          # Documentation
└── requirements.txt   # Dependencies

Code Quality

  • Clean, modular code structure
  • Type hints for better code maintainability
  • Comprehensive error handling
  • Async/await for efficient performance
  • Professional embed formatting
  • Secure API key management

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Copyright (c) 2025 Numan Khan

Acknowledgments

About

A clean, efficient Discord bot that provides AI-powered responses using OpenRouter's AP...

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages