This is an example Discord Chat Bot based on Open Ai and Discord.js Library. Enjoy!
- A Discord Bot with its Token.
- Open Ai API Key Get Key from here
- Create a file named
.env
. - Enter the following details to it:
token="YOUR TOKEN"
OPENAI_API_KEY="API KEY"
- Save the file. Open Terminal in the Project Directory.
- Head to
Line 57: index.js
. - Enter the Channel ID
- Run:
npm i
node index.js
- You are done.
- To change chat channel, head to
Line 57: index.js
. - Change the Channel ID
Join one of these Discord Servers, to get support: