Skip to content

A bot that uses the OpenAI api to respond to messages in Discord.

License

Notifications You must be signed in to change notification settings

ImDarkTom/OpenAIBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAI Chat Discord Bot

A discord.js bot that uses the OpenAI API to be able to respond to users that mention the bot in a message.

The script outputs the amount of tokens used every time an OpenAI request is made. The max_tokens per request can be changed by setting it to a different value in the .env file (default is 512). It also keeps track of total tokens used per session of the script running.

External Libraries

  • OpenAI
  • Discord.js

Installation

Clone the repository

git clone https://github.com/ImDarkTom/OpenAIBot .

Set up .env file with your bot's token and OpenAI API key

TOKEN = Bot Token
OPENAI_KEY = OpenAI Key

Run the bot

node .\src\index.js

or

node .

License

GNU General Public License v3.0

About

A bot that uses the OpenAI api to respond to messages in Discord.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published