/chatgpt-discord-bot

A discord bot for interact with ChatGPT

Primary LanguageJavaScriptApache License 2.0Apache-2.0

chatgpt-bot

A discord bot for interact with ChatGPT

Setup Guide

  1. Clone repository
    git clone https://github.com/MrlolDev/chatgpt-discord-bot.git
  1. Install dependencies.
    npm install
  1. Create a new .env file
# .env

TOKEN=Discord token id(https://discord.dev)
CLIENT_ID=Discord client id(https://discord.dev)
SUPABASE_KEY=Supabase key(https://app.supabase.com)
SUPABASE_URL=Supabase url(https://app.supabase.com)
SESSION_TOKEN="replace with your open ai session key"
API_TOKEN=Get it from https://justbrowse.io
  1. Run the bot
    node .

Get session key

  1. Go to https://chat.openai.com/chat
  2. Log in to your account
  3. Open developer tools
  4. Go to the application section
  5. Go to the cookies section
  6. And get your session token which is the cookie with the name: "__Secure-next-auth.session-token"

TO DO:

  • Chat command with ChatGPT response. --> 0.0.2
  • Conversations support(the bot have context from the previous messages). --> 0.0.3
  • Bot command(get information about the bot and the ping bot). --> 0.0.3
  • Feedback command(allow people to send feedback). --> 0.0.4
  • Auto refresh session token --> 0.0.5
  • Includes user message in chat command. --> 0.0.6
  • Solve ChatGPT issues --> 0.0.6
  • Limits to 1 conversation per channel. --> 0.0.6
  • Host on vps server --> 0.0.7
  • Allow private conversations --> 0.0.9
  • Embeds --> 0.0.9
  • Top.gg rewards --> Future
  • Partials responses during loading --> Future
  • Uptime Robot alerts --> Future