Creator: Yaashir
This Discord bot, created by Yaashir, utilizes the power of OpenAI's GPT-3.5 Turbo model to provide chat-based responses in your Discord server. With this bot, you can have dynamic conversations with ChatGPT, the helpful assistant. Simply send a message starting with !chatgpt and ChatGPT will respond to your queries.
Before using this bot, make sure you have the following prerequisites:
- Node.js installed on your system.
- A Discord bot token.
- An OpenAI API key.
To get started, follow these steps:
-
Clone this repository to your local machine.
-
Open the terminal and navigate to the bot's directory.
-
Install the required Node.js packages by running:
npm install discord.js axios
-
Open the
config.jsfile and replace'YOUR_BOT_TOKEN'with your Discord bot token and'YOUR_OPENAI_API_KEY'with your OpenAI API key. -
Save the changes and close the
config.jsfile.
-
To run the bot, open a terminal and navigate to the bot's directory.
-
Start the bot with the following command:
node bot.js
-
Once the bot is running, it will log in as your Discord bot and listen for messages in your server.
-
To interact with ChatGPT, simply send a message that starts with
!chatgptfollowed by your question or input.
For example, to ask a question, type !chatgpt How does photosynthesis work? and ChatGPT will respond with an answer.
!chatgpt <your_message>: Send a message to ChatGPT and receive a response.
- This bot uses OpenAI's GPT-3.5 Turbo model, and you will need to have the corresponding API key for it.
- Be cautious with the usage of the bot, as it may incur API usage charges.
- Ensure that your bot has the necessary permissions to read and send messages in your Discord server.
If you encounter any issues or have questions about this bot, please feel free to contact Yaashir for assistance.
Happy chatting with ChatGPT!