Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bamacharanchhandogi/discord-gemini-bot
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.
https://github.com/bamacharanchhandogi/discord-gemini-bot
bot discord-bot discord-js gemini-api gemini-bot javascript
Last synced: 11 days ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/bamacharanchhandogi/discord-gemini-bot
- Owner: BamaCharanChhandogi
- Created: 2024-03-24T05:35:15.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-29T21:08:01.000Z (9 months ago)
- Last Synced: 2024-11-05T17:05:10.607Z (about 2 months ago)
- Topics: bot, discord-bot, discord-js, gemini-api, gemini-bot, javascript
- Language: JavaScript
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Discord-Gemini-Bot
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.
## Features
- **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.## Prerequisites
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](https://discord.com/developers/applications))
- A Gemini API key (sign up for an account at [Gemini API](https://www.gemini.com/api))## Installation
1. Clone the repository:
```bash
git clone https://github.com/your-username/discord-gemini-bot.git
```2. Navigate to the project directory:
```bash
cd discord-gemini-bot
```
3. Install the required dependencies:
```
npm i @google/generative-ai discord.js dotenv
```
4. Create a .env file in the project directory and add your Discord bot token and Gemini API key
```bash
DISCORD_BOT_TOKEN=your-discord-bot-token
GEMINI_API_KEY=your-gemini-api-key
```
# Usage
To run the bot, execute the following command:
```bash
npm start
```
The bot will start running and listening for commands in the Discord server it has been added to.## Commands
- `!chat `: Ask the bot a question, and it will provide an answer using the Gemini API.
--------------------------------------------
## Contributing
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
## License
This project is licensed under the [MIT License](LICENS).