A Discord bot in Python that responds to @ messages with the OpenAI API for text completion.
python3 -m venv my_env
Now set the virtual environment as the current.
source my_env/bin/activate
pip install discord
pip install openai
pip install python-dotenv
Create a .env
file in application root and set two values for the bot's API credentials:
DISCORD_TOKEN = your-token
OPENAI_KEY = your-key
python3 bot.py