Skip to content

arcanine300/OpenAiDiscordBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OpenAiDiscordBot

A simple text to image discord bot written in python using OpenAI DALL-E 2 model

Example Image

Getting Required API Keys

  • You will need to get your free OpenAI and Discord API keys in order for this bot to work. Create your Discord bot and copy the application token from here. Paste the value into the token variable in the script.
  • Next create an account at OpenAi.com this step will require a phone number. After you have made your account copy your API key and Organization ID into the ai.api_key and ai.organization variables.

Dependencies

  • Discord-py (2.2.1): pip install discord-py docs
  • OpenAI (0.26.5): pip install openai docs
  • aiohttp (3.8.4): pip install aiohttp docs

Running the Bot

Add your Discord bot to your server making sure you have given it the necessary privileges (i.e message content, send messages, embed links, attach files) and Run the bot in any terminal with python Txt2Img-DiscordBot.py

Alternative API Key Storage

If you are planning on deploying this script you might want to consider setting up environment variables to store your keys rather than having them in the script source code.

About

A simple text to image discord bot written in python using OpenAI dall-e 2 model

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages