requirement for the code
Node.js -> Node.js
Open and write Terminal
npm install discord.js openai dotenv
npm init -y
You need to create .env and following codes for API
TOKEN =
OPENAI_API_KEY =
CHANNEL_ID =
It needs to be defined like
"scripts": { "start": "node index.js", "test": "echo "Error: no test specified" && exit 1" },
npm run start