An open-source Discord bot that leverages AI to generate art based on user prompts with Stable Diffusion. This bot uses the discord.js library for Discord interactions and Civitai's SDK for generating images.
- Art Generation: Generate AI art using user prompts with SDXL.
- Text Logo Creation: Generate text-based logos using AI.
- Node.js (>=14.0.0)
- A Discord server to host the bot
- An API key from Civitai for the image generation.
- Clone the repository:
git clone https://github.com/yourusername/discord-ai-art-generator.git && cd discord-ai-art-generator
- Install dependencies:
npm install
- Create a
config.json
file in the root directory of the project with the following fields:
{
"clientId": "",
"token": "",
"guildId": "",
"civitai_api_key": ""
}
clientId
, token
and guildId
are Discord API related fields, you can find more information about them in the Discord Developer Portal and discord.js's getting started guide.
civitai_api_key
is your Civitai account's API key, you can generate an API key from Your Account Settings.
- Register the application commands:
node deploy-commands.js
- Start the bot:
node index.js
For production use, consider using a process manager like PM2.
- /generate prompt [CFG, negative prompt, seed, steps, etc.]: Generates an AI art piece based on the provided prompt using an SDXL checkpoint.
- Example:
/generate prompt:"A beautiful sunset over the ocean" CFG:10
- Example:
- /textlogo text [prompt]: Generates a text-based logo based on the provided text using SDXL.
- Example:
/textlogo text:"AI Art Generator" prompt:summer,blue sky, masterpiece, 8K
- Example:
I, Eero Pomell, am no longer personally working on this project, but I'm still maintaining PRs. You are also encouraged to fork it and extend the feature set however you like!
This project is licensed under the MIT License - see the LICENSE.md file for details.
This bot is an open-source continuation of discord bot AI Art Games by me (Eero), that I developed over January to April 2024. It was used in Civitai's community server and 100 other AI art servers.
Others:
- discord.js for the library used to interact with Discord.
- Civitai for providing the AI art generation capabilities.