Welcome to the Discord Chat Bot powered by ChatGPT. This bot generates responses using the OpenAI ChatGPT model and provides various commands for customization. The bot is containerized using Docker Compose for easy deployment.
-
Make sure you have Docker Compose installed on your system.
-
Clone the repository to your local machine:
git clone https://github.com/Dmitry-Kang/discord_chatgpt.git
cd discord_chatgpt- Before running the bot, make sure to edit the
config.jsonfile with your Discord and OpenAI credentials.
{
"discord_bot_token": "your_discord_bot_token",
"discord_channel_id": "your_discord_channel_id",
"openAI_key": "your_openai_api_key"
}- Build and run the Docker containers:
docker-compose up --build/help: Display a list of available commands./reset: Clear the conversation history./chat your_message: Send a message to the bot and receive a response./private: Set the bot to respond privately to the user./public: Set the bot to respond publicly for all users.
- To send a message to the bot:
/chat Hello, bot! - To reset the conversation history:
/reset - To switch to private responses:
/private - To switch to public responses:
/public
Make sure to handle your OpenAI API key securely and avoid sharing it publicly. Additionally, follow Discord's guidelines for bot permissions and privacy.
Feel free to customize and extend the bot to fit your specific needs. Happy chatting!