GEMM-X Discord Bot is a versatile and intelligent Discord assistant leveraging cutting-edge AI technologies from multiple providers. This bot can engage in natural language conversation, generate images, create music, produce speech, and much more, making it an all-in-one solution for your server.
- Image Generation: Generates images based on user prompts using various models.
- Speech Generation: Converts text to speech in multiple languages.
- Music Generation: Creates music based on textual prompts.
- Custom Personalities: Allows users and servers to define custom personality settings.
- Advanced Interaction: Offers comprehensive user and server settings, including chat history management and response formatting.
- Node.js (v14 or later)
- Discord Bot account & token (create a bot on Discord Developer Portal)
-
Clone the repository:
git clone https://github.com/hihumanzone/AI-Discord-Bot cd AI-Discord-Bot
-
Install dependencies:
npm install openai @google/generative-ai url cohere-ai axios cheerio discord.js dotenv eventsource fs node-fetch sharp pdf-parse youtube-transcript node-os-utils ws
-
Set up environment variables:
Create a
.env
file in the root directory and add your Discord bot token and API keys for the various providers:DISCORD_BOT_TOKEN=your_discord_bot_token # for prompt enhancer.. OPENAI_BASE_URL=https://api.openai.com/v1 # https://api.groq.com/openai/v1 # for groq ⤴️ OPENAI_API_KEY=your_openai_api_key OPENAI_GROQ_API_KEY=your_openai_groq_api_key OPENAI_TOGETHER_API_KEY=your_openai_together_api_key OPENAI_OPENROUTER_API_KEY=your_openai_openrouter_api_key OPENAI_KRAKENAI_API_KEY=your_openai_krakenai_api_key GOOGLE_API_KEY=your_google_gemini_api_key COHERE_API_KEY=your_cohere_api_key
-
Configure the bot:
Edit the
config.json
file to modify settings as per your preferences. -
Start the bot:
npm start
/imagine [prompt] [model] [resolution]
: Generate an image using a selected model and resolution.
/respond_to_all
: Enable the bot to respond to all messages in the current channel./clear_memory
: Clear the conversation history./settings
: Open user settings./server_settings
: Open server settings.
/speech [language] [prompt]
: Generate speech from text in the specified language./music [prompt]
: Generate music based on a prompt.
/blacklist [user]
: Blacklist a user from using interactions./whitelist [user]
: Remove a user from the blacklist./status
: Display bot's CPU and RAM usage in detail.
Contains various settings for the bot:
- defaultResponseFormat: The default response format (
embedded
ornormal
). - hexColour: The default hex color for embeds.
- defaultPromptEnhancerPreference: Whether prompt enhancement is enabled by default.
- defaultImgModel: The default model for image generation.
- defaultTextModel: The default model for text generation.
- defaultUrlReading: Default URL reading preference (
ON
orOFF
). - workInDMs: Whether the bot should respond in DMs (
true
orfalse
). - shouldDisplayPersonalityButtons: Whether to display personality buttons (
true
orfalse
). - shouldDisplayTextModelButton: Whether to display text model selection button (
true
orfalse
). - SEND_RETRY_ERRORS_TO_DISCORD: Whether to send retry errors to Discord channel (
true
orfalse
). - activities: An array of activities for the bot to display.
Contains an array of words that should be filtered from prompts.
- Join the Discord Community for support, updates, and discussions.
- Groq: Get API Key
- Together AI: Get API Key
- OpenRouter: Get API Key
- Kraken AI: Join Discord to get access
- Google: Get API Key
- Cohere: Get API Key
- Cohere Command R Plus (Web)
- Groq Llama 3 70B
- Groq Llama 3 8B
- Groq Gemma 2 9B
- Together Qwen 2 72B
- Together Llama 3 70B
- Together DBRX
- OpenRouter Phi-3 Medium 128K
- OpenRouter Gemma 2 9B
- OpenRouter Llama 3 8B
- KrakenAI Gemini 1.5 Flash
- KrakenAI Claude 3.5 Sonnet
- Google Gemini 1.5 Flash
- Google Gemini 1.5 Pro
NOTE
: All of them have a free plan and work without a credit card. They don't have a lifetime usage limit, except forTogether AI
, but it provides $25 in credits, which will probably last a long time because they are cheap. All of them, except forKraken AI
, appear to have good rate limits. ForKraken AI
, we get 500 credits per day, which equates to about 25Claude 3.5 Sonnet
messages per day.
We welcome contributions! Feel free to fork the repository, create a new branch, make your changes, and submit a pull request.
This project is licensed under the MIT License.
Happy Discording with GEMM-X!
If you find this bot useful, don't forget to ⭐star the repository!