Integrate OpenAI's ChatGPT into your Discord bot. Customize this bot to behave exactly as you like.
- OpenAI API Key: Obtain your API key here.
- Discord Bot Token: Create a Discord bot and get its token here.
- Python 3+: Download Python from here.
-
Install Python and PIP:
- Download and install Python 3+ from the link above.
- Open PowerShell and run:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python get-pip.py
-
Install Dependencies:
- Run the following command in PowerShell to install the necessary dependencies:
pip install py-cord openai==0.28
- Run the following command in PowerShell to install the necessary dependencies:
-
Download and Run the Bot:
- Download the
bot.pyfile. - Open PowerShell in the directory where the file is stored.
- Run the bot with:
py .\bot.py
- Download the
- Bot Token and API Key: Replace
"discord bot token"and"api_key"in thebot.pyfile with your actual keys. - Bot Persona: Modify the line
"You are NAME, a smart and fun bot..."to create a unique persona for your bot.
If you find this project helpful and want to support its development, consider buying me a coffee! Your support is greatly appreciated.
Stay updated and discuss the project by joining our Discord community:
Feel free to open an issue or submit a pull request if you have any suggestions or improvements. Your contributions are welcome!