This is a Discord bot that utilizes the Gemini API to generate responses and images based on user input. The bot can engage in conversations, answer questions, and create images on the fly.
- Conversation: The bot can engage in natural conversations by understanding user input and providing relevant responses using the Gemini API.
- Question Answering: Users can ask the bot questions on various topics, and it will provide accurate answers by leveraging the Gemini API's knowledge base.
- Image Generation: The bot can generate images based on user prompts using the Gemini API's image generation capabilities.
Before running the bot, make sure you have the following:
- Python 3.6 or higher
- A Discord bot token (obtain one from the Discord Developer Portal)
- A Gemini API key (sign up for an account at Gemini API)
- Clone the repository:
git clone https://github.com/your-username/discord-gemini-bot.git
- Navigate to the project directory:
cd discord-gemini-bot
- Install the required dependencies:
npm i @google/generative-ai discord.js dotenv
- Create a .env file in the project directory and add your Discord bot token and Gemini API key
DISCORD_BOT_TOKEN=your-discord-bot-token
GEMINI_API_KEY=your-gemini-api-key
To run the bot, execute the following command:
npm start
The bot will start running and listening for commands in the Discord server it has been added to.
!chat <question>
: Ask the bot a question, and it will provide an answer using the Gemini API.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
This project is licensed under the MIT License.