Skip to content

andrewhuhh/gpt-discord-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPT-discord-bot

GPT-powered discord chatbot

  1. Get an OpenAI API key at https://platform.openai.com/account/api-keys.
  2. Replace 'your_api_key' with your API key.
  3. Register your Discord bot at Discord Developer Portal https://discord.com/developers/applications.
  4. Click "New Application" and give it a name
  5. Click on "Bot" and "Add Bot"
  6. Copy the bot token and replace 'your_discord_bot_token' with your bot token.
  7. If the token doesn't appear, click "Reset Token" and it'll be there.
  8. Click on OAuth2, select "bot" from scopes, then select "Send Messages" and "Read Message History" (or just administrator, if you're lazy), and copy paste the generated URL at the bottom into your browser or Discord to invite the bot to your server.
  9. Install the necessary dependencies from the requirements.txt file (if you're using VSCode, there should be a "Build environment" button when you open the file, otherwise type 'pip install openai discord' into powershell).
  10. Run the python file!

PS. If you don't want to talk to the bot in the server, DMing it works too.

PS.2 As of 4/10/2023, the bot doesn't have a context window, meaning it doesn't have any memory of messages aside from the latest one.

About

GPT-powered discord chatbot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages