An intelligent and versatile Discord chatbot built with JavaScript and Discord.js. This bot integrates advanced AI models to provide real-time interaction, automated responses, and enhanced community engagement within your Discord server. Demo: AI M
- Real-time AI Interaction: Natural and fluid conversations powered by [Insert AI Model, e.g., OpenAI/Gemini/Ollama].
- Contextual Awareness: Remembers previous messages for more coherent and human-like interactions.
- Multi-Modal Support: Ability to process text and images (depending on the integrated model).
- Slash Commands: Modern Discord integration using
?commands for easy usage. - Highly Customizable: Easily configurable prefixes, personality traits, and permission levels.
- Language: Node.js (JavaScript)
- Library: Discord.js
- Environment: NPM / Yarn
- AI Engine: Gemini API , OpenAI API, Etc.
To host this bot locally or on a server, follow these steps:
-
Clone the repository
git clone https://github.com/Ilhamaji/ai-bot.git cd ai-bot -
Install dependencies
npm install
-
Environment Setup Create a
.envfile in the root directory and add your secret tokens:API_KEY= //OpenRemote GOOGLE_API_KEY= //Google GROQ_API_KEY= //Groq BOT_TOKEN= //Bot Token
-
Register Slash Commands (If applicable)
node deploy-commands.js
To start the bot:
node index.jsOr, if you use PM2/Nodemon:
nodemon index.js?[your question]— Ask the AI a question (Prefix mode).
You can modify the bot's behavior in the config.json or settings.js file:
- Temperature: Control the creativity of the responses.
- System Prompt: Define the bot's "personality" (e.g., "You are a helpful assistant").
- Channels: Restrict the bot to specific text channels.
- Fork the Project.
- Create your Feature Branch (
git checkout -b feature/CoolFeature). - Commit your Changes (
git commit -m 'Add some CoolFeature'). - Push to the Branch (
git push origin feature/CoolFeature). - Open a Pull Request.
Distributed under the MIT License. See LICENSE for more information.
Ilham Aji - GitHub Profile
Project Link: https://github.com/Ilhamaji/ai-bot
Disclaimer: Ensure you comply with the terms of service of your AI provider and Discord's Developer Policy.