packages that I use: discord.js, openai
Clone the repo on your system:
git clone https://github.com/3raphat/chatGPT-discord-bot.git
Then, navigate to the directory and install the npm packages:
npm install
Copy the .env.example
to .env
and fill out the values:
cp .env.example .env
-
Click on
Create new secret key
button. -
Copy the OpenAI API key, then paste it into the
OPENAI_API_KEY
in.env
file.
npm run start
After run the bot, use node deploy-commands.js
to deploy the slash commands.