This is a Node.js application that uses the Discord.js library and the OpenAI API to create a chatbot that can answer user queries. The bot uses the GPT-3.5-Turbo model to generate responses to user messages based on a given context. Installation
Clone the repository
Run npm install to install the necessary dependencies
Create a .env file and add your Discord bot token and OpenAI API key in the following format:
DISCORD_TOKEN=<YOUR_DISCORD_BOT_TOKEN>
OPENAI_TOKEN=<YOUR_OPENAI_API_KEY>
Run npm run start to start the bot
To use this bot, simply add it to your Discord server and start messaging it. The bot listens for messages that start with the "!" character and responds to them with the appropriate response generated by the GPT-3.5-Turbo model.
The bot is designed to provide accurate and succinct responses to user queries based on the provided context. The bot can handle both direct messages and replies to previous messages, allowing for more complex conversational interactions.
Contributions are welcome! If you find a bug or have a feature request, please open an issue or submit a pull request. License
This project is licensed under the MIT License - see the LICENSE file for details.