Skip to content

Simple Discord chat bot built using the GPT 4 Model from OpenAI

License

Notifications You must be signed in to change notification settings

cclngit/gpt-4-bot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EN

Chatbot Discord

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.

Setup

  1. Clone the repository and navigate to the project directory.
  2. Install the required dependencies using npm install.
  3. 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>
  1. Run the bot using node index.js.

Usage

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.

Contributing

If you want to contribute to this project, feel free to fork the repository and submit a pull request.

License

This project is licensed under the MIT License.

FR

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.

Configuration

  1. Clonez le dépôt et accédez au répertoire du projet.
  2. Installez les dépendances requises à l'aide de npm install.
  3. 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>
  1. Lancez le bot en utilisant node index.js.

Utilisation

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.

About

Simple Discord chat bot built using the GPT 4 Model from OpenAI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%