DiscordBot OpenAI API
1.0.0
A simple Python-based Discord bot for the OpenAI API
NOTE: This bot is heavily WIP and is currently only intended for special use case purposes. Many of the features have not been implemented yet. For a more sophisticated project, see i.e. my Telegram bot.
Although merely a crude initial sketch, this bot basis uses (as of January 2024) the up-to-date version of OpenAI's Python library (v1.6.1) as well as discord.py (v2.3.2).
git clone https://github.com/FlyingFathead/DiscordBot-OpenAI-API/ => cd DiscordBot-OpenAI-API/pip install -r requirements.txt
or:discord.py==2.3.2
configparser>=6.0.0
httpx>=0.26.0
openai>=1.6.1
transformers>=4.36.2
requests>=2.31.0
DISCORD_BOT_TOKEN or place it in the program directory as discord_bot_token.txt.Bot settings tab in the Developer Portal):
Message Content Intent
Required for your bot to receive message content in most messages.
NOTE: Once your bot reaches 100 or more servers, this will require verification and approval. Read more here
OPENAI_API_KEY environment variable or into api_key.txt in the program directory.config.inipython main.pyTimezone added to options.