Below is the updated README with the new repository name and the additional instructions regarding the character description file and the new .env.example:
This Discord bot integrates OpenAI's GPT-4o model to provide interactive, AI-driven responses. It handles chat completions, offers concise replies, and adapts to conversation contexts dynamically.
- AI Conversations: Engage in natural, flowing dialogues powered by GPT-4o.
- Context Management: Maintains conversation history to provide relevant responses.
- Customizable Responses: Adjust reply length and style via settings.
- Character Customization: Easily modify the bot's personality by editing the character description file.
- Node.js (v18 or higher recommended)
- Discord.js library
- OpenAI API key
-
Clone the Repository
git clone https://github.com/wobkobi/ChatGPT-Discord-Bot.git cd ChatGPT-Discord-Bot
-
Install Dependencies
npm install
-
Configure Environment
Rename the
.env.example
file to.env
and update it with your credentials:# REQUIRED: OPENAI_API_KEY="your_openai_api_key" BOT_TOKEN="your_discord_bot_token" Client_ID="your_bot_client_id" OWNER_ID="your_owner_user_id" # OPTIONAL: # If you want to use a different encryption key, set it here. ENCRYPTION_KEY_BASE="your_encryption_key"
-
Customize Bot Personality
Rename the
src/data/characterDescription.ts.example
file tosrc/data/characterDescription.ts
and edit it to reflect the personality you want your bot to have. This file defines how the bot introduces itself and behaves in conversations. -
Run the Bot
npm run start
Invite the bot to your Discord server and interact with it by mentioning the bot or using its slash commands. For example:
@BotName How's the weather today?
The bot will reply based on its AI capabilities and the parameters set for conversation length and complexity.
For support, please open an issue on the GitHub repository.
This bot provides a powerful way to add AI-driven interactions to your Discord server. Customize it to fit your needs—especially by editing the characterDescription.ts
file—and enjoy the advanced capabilities of GPT-4o in your community.
Feel free to adjust any sections as needed.