https://github.com/codewithdark-git/discord-bot
This Discord bot uses Google Generative AI and Replicate AI to generate text and images based on user prompts.
https://github.com/codewithdark-git/discord-bot
bot discord discord-bot gemini-api generative-ai generative-model google-api pypi python replicate replicate-api
Last synced: 9 months ago
JSON representation
This Discord bot uses Google Generative AI and Replicate AI to generate text and images based on user prompts.
- Host: GitHub
- URL: https://github.com/codewithdark-git/discord-bot
- Owner: codewithdark-git
- License: mit
- Created: 2024-04-20T12:22:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-08T11:05:18.000Z (over 1 year ago)
- Last Synced: 2025-02-14T11:33:04.866Z (11 months ago)
- Topics: bot, discord, discord-bot, gemini-api, generative-ai, generative-model, google-api, pypi, python, replicate, replicate-api
- Language: Python
- Homepage:
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# Discord AI Bot
This Discord bot uses Google Generative AI and Replicate AI to generate text and images based on user prompts.
## Setup
1. Clone this repository to your local machine.
2. Install the required dependencies by running:
```
pip install -r requirements.txt
```
3. Create a `.env` file in the project directory and add your Discord bot token and Google API key:
```
DISCORD_TOKEN=your_discord_token_here
GOOGLE_API_KEY=your_google_api_key_here
```
4. Run the bot script:
```
python bot.py
```
## Usage
### Text Generation
To generate text, use the `/chat` command followed by your prompt. For example:
```
/chat Tell me a joke.
```
### Image Generation
To generate images, use the `/image` command followed by your prompt. For example:
```
/image Landscape with mountains and rivers.
```
## Dependencies
- discord.py: Python wrapper for the Discord API.
- dotenv: Library for loading environment variables from a `.env` file.
- replicate: Python package for interacting with the Replicate AI API.
- google.generativeai: Python package for interacting with the Google Generative AI API.
## Credits
- [Discord.py](https://github.com/Rapptz/discord.py)
- [dotenv](https://github.com/theskumar/python-dotenv)
- [Replicate AI](https://replicate.ai/)
- [Google Generative AI](https://github.com/google-research/google-research/tree/master/generative_aim)