Skip to content

beelchester/chatgpt-discord-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatGPT Discord Bot

A discord bot based on text-davinci-003 model from OpenAI API

Installation

  1. Clone the repository
git clone https://github.com/sahilyeole/chatgpt-discord-bot
  1. cd into the chatgpt-discord-bot directory
  2. Make sure you have the latest version of Node installed and run the following command
  npm install
  1. Create a new application on Discord Developer Portal and check message content intent in the Bot section
  2. Add a custom Authorization Link in OAuth2 section
https://discord.com/oauth2/authorize?scope=bot&permissions=8&client_id=<YOUR_CLIENT_ID>
  1. Invite the bot to the server using the link and grant it Administrator privilege
  2. Create .env file and add your credentials for the following variables from OpenAI API and Discord Developer Portal
DISCORD_TOKEN = 
DISCORD_CHANNEL_ID = 
OPENAI_ORG =  
OPENAI_KEY =

Note:

- You can get the channel id by right-clicking the channel name on discord

- OPENAI_ORG is for the organization key

  1. Run the bot
node index.js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published