Get a discord bot and a telegram bot in a few steps
- Private conversation
- Group conversation
- Generate images according to prompts
- Export response messages to file
- Support Dockerfile to deploy.
- Other
You should install pnpm (recommended) or yarn or npm in your local system.
-
Clone the repo
$ git clone git@github.com:1COOS/chatgpt-bot.git
-
Config environment variables
Copy
.env.exampleto.envENABLE_DISCORD = true ENABLE_TELEGRAM = false DISCORD_BOT_TOKEN = your_discord_token DISCORD_CLIENT_ID = your_discord_client_id TELEGRAM_BOT_TOKEN = your_discord_token OPENAI_KEY = your_openai_key
-
Start the bot
# Install dependencies $ pnpm i # Start the bot $ pnpm run run # Or run in the dev mode $ pnpm run dev # Or run in pm2 - https://pm2.keymetrics.io $ pnpm run run:pm2
-
Pull the docker image
$ docker pull 1coos/chatgpt-bot:latest
-
Start docker container
$ docker run -d \ --name=chatgpt-bot \ -e TZ=Etc/UTC \ -e ENABLE_DISCORD = true \ -e ENABLE_TELEGRAM = true \ -e DISCORD_BOT_TOKEN = your_discord_token \ -e DISCORD_CLIENT_ID = your_discord_client_id \ -e TELEGRAM_BOT_TOKEN = your_telegram_token \ -e OPENAI_KEY = your_openai_key \ --restart unless-stopped \ 1coos/chatgpt-bot:latest
or you can run docker with docker-compose
version: '3.9' services: chatgpt-bot: image: 1coos/chatgpt-bot:latest container_name: chatgpt-bot environment: ENABLE_DISCORD: true ENABLE_TELEGRAM: false DISCORD_BOT_TOKEN: [your_discord_token] DISCORD_CLIENT_ID: [your_discord_client_id] TELEGRAM_BOT_TOKEN: [your_telegram_token] OPENAI_KEY: [your_openai_key] restart: unless-stopped
If you have a suggestion that would make this better, please fork the repo and create a pull request.
Don't forget to give the project a star! Thanks again! 🍵
This project is licensed under the MIT License - see the LICENSE file for details.
1COOS - Discord - 1coosgroup@gmail.com
