Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.
/ discordCGPT Public archive

A simple Discord bot that integrates OpenAI's ChatGPT

License

Notifications You must be signed in to change notification settings

marcreniel/discordCGPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

discordCGPT

A simple Discord bot that integrates OpenAI's ChatGPT. Developed using discord.js, discordx, and chatgpt-api. This is also my first project written in TypeScript!

Prerequisites

How to aquire a ChatGPT Token (Credit Travis Fischer/chatgpt-api)

This package requires a valid session token from ChatGPT to access it's unofficial REST API.

To get a session token:

  1. Go to https://chat.openai.com/chat and log in or sign up.
  2. Open dev tools.
  3. Open Application > Cookies. ChatGPT cookies
  4. Copy the value for __Secure-next-auth.session-token and save it to your .env file (which will be covered next).

Setup

First, clone the repo using git:

git clone https://github.com/imedra/Maple

Second, install the required dependencies.

npm install

Third, create a .env file in the root directory and fill out the required fields

discord_token = Insert Discord Token Here
openai_token = Insert OpenAI Token Here

Finally, run ``npm run start` and enjoy!

Credits

License

This project is licenced via MIT.

About

A simple Discord bot that integrates OpenAI's ChatGPT

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published