A simple Discord bot for generating images using OpenAIs DALL·E 2 image generation API.
112
ImageBot is a simple Discord bot for using OpenAi's DALL·E 2 image generation API on Discord servers. It is written in TypeScript using discord.js and includes unit tests written with Jest.
You can contact me for a demo of the bot or host it on your own. I am not running the bot publicly as OpenAi's pricing is not cheap.
To run the bot you will need:
To run this bot, you need to create an .env file that includes the needed enviroment variables. I have included a template for this purpose, but heres a quick rundown of the variables:
DISCORD_TOKEN= //Discord token for your bot.
OPENAI_TOKEN= //Token for OpenAi's DALL·E 2 API.
CLIENT_ID= //Client ID of your bot.
GUILD_ID= //Guild ID of a development server, this is used to deploy the commands to only 1 Discord server.
Running ImageBot with Docker is very easy, you can do it with my Docker image. Note that you need to provide the environment variables with -e option or use your platform provider's tools to create them.
docker run -d \
--name imagebot \
-e DISCORD_TOKEN="discord_token" \
-e OPENAI_TOKEN="openai_token" \
-e CLIENT_ID="clientid" \
kvllu/imagebot
(Add -e GUILD_ID if you want to run the bot on 1 Discord server only)
ImageBot is in early development, it currently has the following:

/image command with options:
Options with ⚠️ are required.
Note: Discord Client ID of the user that executed the command will also be included in the API call to prevent spam and abuse.
Content type
Image
Digest
sha256:10cc442a5…
Size
377 MB
Last updated
about 3 years ago
docker pull kvllu/imagebot