This Discord bot utilizes an AI image generation API to create images based on user prompts. It supports both traditional command-based interaction as well as slash commands.
- Image Generation: Users can generate images by providing prompts to the bot. The bot then utilizes an AI model to generate an image based on the prompt.
- Slash Commands: The bot supports slash commands for streamlined interaction and ease of use.
- Customization: Users can customize the image format, type, and visibility of generated images.
- >imagine [prompt]: Generate an image based on the provided prompt.
- Example:
>imagine A beautiful sunset over the mountains
- Example:
- /imagine: Generate an image using a slash command.
- Options:
- prompt: Description of the image.
- private: Make the image visible for you or everyone.
- image_format: The format of the image (e.g., default, portrait, landscape).
- image_type: Type of the image (e.g., realistic, 3D, anime).
- Options:
- Clone this repository.
- Install dependencies by running
pip install -r requirements.txt
. - Create a new Discord bot and obtain its token:
- Go to the Discord Developer Portal.
- Create a new application and navigate to the "Bot" tab.
- Click "Add Bot" to create a bot user for your application.
- Copy the token provided under the bot's username and avatar.
- Replace the
client.run("")
line inbot.py
with your Discord bot token. - Run the bot using
python bot.py
.
discord.py
: Discord API wrapper for Python.aiohttp
: Asynchronous HTTP client/server framework.asyncio
: Asynchronous I/O support.datetime
: Date and time manipulation.
- thanks to OpenImagery for providing a free AI api