Skip to content

A simple vanilla javascript Discord bot for interacting with the new language model Code-Davinci-002 from OpenAI. This bot can serve as an invaluable coding buddy and debugging tool.

Notifications You must be signed in to change notification settings

Lane-G-Smith/Vanilla-JS-Code-Davinci-002-Discord-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(Code-Davinci API Deprecated) Vanilla-JS-Code-Davinci-002-Discord-Bot


Discord.js

A simple vanilla javascript Discord bot for interacting with the new language model Code-Davinci-002 from OpenAI. This bot can serve as an invaluable coding buddy and debugging tool.

Vanilla-JS-Code-Davinci-002-Discord-Bot installation and deloyment Instructions

!!This bot does NOT respond to DMs, it must be in a server with you!!

Get the bot 'shell' from Discord. It's free, and it takes 5 minutes

https://discord.com/developers/applications

Go to OpenAI and open an account

https://platform.openai.com/signup

Install node.js

https://nodejs.org/en/

Install git

https://git-scm.com/downloads

Create a new folder and navigate to it in terminal to set up git

git init

Navigate to new git folder in terminal and clone this repository

git clone https://github.com/Lane-G-Smith/Vanilla-JS-Code-Davinci-002-Discord-Bot.git

Navigate to Vanilla-JS-Code-Davinci-002-Discord-Bot folder and install dependencies

npm install

Create new file in Vanilla-JS-Code-Davinci-002-Discord-Bot folder and name it .env

Place your secret Discord bot token from the first step into the .env file

TYPE THIS EXACTLY, IT IS CASE SENSITIVE: TOKEN=your_unique_token_here

Place your secret OpenAI API key from the second step into the .env file

TYPE THIS EXACTLY, IT IS CASE SENSITIVE: OPENAI_API_KEY=your_unique_API_key_here

To host the bot locally, open project in terminal and run node

node index.js

To host the bot locally and keep it running in the background indefinitely, install PM2

npm install pm2 -g

run your bot locally using pm2 https://pm2.keymetrics.io/

pm2 start index.js

congratulations, your bot should now be live & confirmation should be logged in the terminal. Use your personal link from the Discord developer portal to invite your bot to a Discord server

https://discord.com/developers/applications

About

A simple vanilla javascript Discord bot for interacting with the new language model Code-Davinci-002 from OpenAI. This bot can serve as an invaluable coding buddy and debugging tool.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published