Discord bot that uses ChatGPT (3.5-turbo) API to answer questions.
- Create a Discord bot, invite it to your server and save its token. It must be given the following permissions :
Send Messages
,Read Messages/View Channels
andChange Nickname
(permission byte :67111936
). - Get an API key from OpenAI.
- Remove
.dist
from.env.dist
and fill in the values with your Discord bot token and OpenAI API key. - Run
go build -o ./bin
to build the bot or download it from the releases and place it in a newly createdbin
folder or in the main folder. - Start the bot with
./bin/gpt-bot
.
The bot will respond to messages according to its current profile. The default profile is condescending
which will make it answer to messages ending with ?
or that are reply to one of his messages. To change the profile, send a message : @your-bot profile <profile-name>
.
To show the list of available profiles and commands, send a message : @your-bot help
.