Skip to content

Commit

Permalink
Merge pull request #12 from rayspock/feat/update-readme
Browse files Browse the repository at this point in the history
馃摑 Add some prerequisite steps for installation
  • Loading branch information
rayspock committed Apr 29, 2023
2 parents 3f0acef + 7c5891a commit 8f4405c
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,36 @@ Discord bot written in Golang that interacts with the ChatGPT API.

## Features

- [x] **[Slash Command]**
- Use `/chat` command to send a message to the bot in public channels, and it will respond with a
message generated
by the ChatGPT API.
- [x] **[Direct Message]**
- Send private messages to the bot, and it will respond with a message generated by the ChatGPT API.
- [x] **[Slash Command]**
- Use `/chat` command to send a message to the bot in public channels, and it will respond with a
message generated
by the ChatGPT API.
- [x] **[Direct Message]**
- Send private messages to the bot, and it will respond with a message generated by the ChatGPT API.

## Installation

To run this bot, please follow these steps:

1. Go to the [releases page](https://github.com/rayspock/go-chatgpt-discord/releases) and download the binary that
matches your operating system. Extract the binary to a directory of your choice (such as `~/go-chatgpt-discord`).
2. In the same directory as the binary, create a copy of .env.example and name it .env. Fill in the appropriate
1. In the same directory as the binary, create a copy of .env.example and name it .env. Fill in the appropriate
credentials as directed.
3. Obtain a new OpenAI API key by following the link [here](https://platform.openai.com/account/api-keys). Then, fill
1. Obtain a new OpenAI API key by following the link [here](https://platform.openai.com/account/api-keys). Then, fill
in `OPENAI_API_KEY`.
4. Set up your Discord application and add a bot from
1. Set up your Discord application and add a bot from
the [Discord Developer Portal](https://discord.com/developers/applications):

- Fill out `DISCORD_BOT_TOKEN` with your Discord bot token from the Bot settings page.
- Copy your "Client ID" from the OAuth2 tab and fill in `DISCORD_CLIENT_ID`.

5. Run the bot by executing `./go-chatgpt-discord`. A bot invitation URL will appear in the console. Copy and paste this
1. Check that the installation worked: `chmod +x go-chatgpt-discord && ./go-chatgpt-discord`
1. Run the bot by executing `./go-chatgpt-discord`. A bot invitation URL will appear in the console. Copy and paste this
URL into your web browser to add the bot to your server.
1. Enable **direct messages** from other members of your server by going to the "Privacy Settings" page of your server
and enabling "Allow direct messages from server members".
1. You're all set! You can now use the bot in your server by typing `/chat` in any channel, or by sending a direct
message to the bot.

## Local Development

Expand Down

0 comments on commit 8f4405c

Please sign in to comment.