This is a chatbot created using Discord.js and OpenAI API. The bot takes messages from a specific channel and responds using OpenAI's GPT-4 model.
- Clone the repository and navigate to the project directory.
- Install the required dependencies using
npm install
. - Create a
.env
file in the root directory with the following environment variables:
TOKEN=<your_discord_bot_token>
CHANNEL_ID=<your_discord_channel_id>
LOG_CHANNEL_ID=<your_discord_log_channel_id>
API_KEY=<your_openai_api_key>
- Run the bot using
node index.js
.
The bot listens to messages in the specified channel and responds to them using the GPT-4 model. To start a conversation with the bot, simply send a message in the channel. The bot will respond with a message generated by the GPT-4 model.
If you want to contribute to this project, feel free to fork the repository and submit a pull request.
This project is licensed under the MIT License.
Il s'agit d'un chatbot créé à l'aide de Discord.js et de l'API OpenAI. Le bot prend des messages d'un canal spécifique et répond en utilisant le modèle GPT-4 d'OpenAI.
- Clonez le dépôt et accédez au répertoire du projet.
- Installez les dépendances requises à l'aide de
npm install
. - Créez un fichier
.env
à la racine du répertoire avec les variables d'environnement suivantes :
TOKEN=<votre_token_de_bot_discord>
CHANNEL_ID=<votre_id_de_canal_discord>
LOG_CHANNEL_ID=<votre_id_de_canal_de_journalisation_discord>
API_KEY=<votre_clé_api_openai>
- Lancez le bot en utilisant
node index.js
.
Le bot écoute les messages dans le canal spécifié et y répond en utilisant le modèle GPT-4. Pour démarrer une conversation avec le bot, envoyez simplement un message dans le canal. Le bot répondra avec un message généré par le modèle GPT-4.