Giter Site home page Giter Site logo

chatgpt-discord's Introduction

chatGPT-discord-bot

This is a project that provides you to build your own Discord bot using chatGPT

โญ A star would be highly appreciated

Features

  • ! [message] The bot will respond to you via private message

  • !reset The bot conversation history will be reset

Setup

Install

pip install -r requirements.txt

dependencies: Reverse Engineered ChatGPT by OpenAI here and discord.py

Step 1: Create a Discord bot

  1. Go to https://discord.com/developers/applications create an application

  2. Build a Discord bot under the application

  3. Get the token from bot setting

    1670143818339

  4. Store the token to config.json under the discord_bot_token

    1670250610205

  5. Turn MESSAGE CONTENT INTENT ON

    1670176647431

  6. Invite your bot through OAuth2 URL Generator

    1670176722801

Step 2: Email and password authentication

Save both in config.json

1670250583265

Warning

If you are logging in with a Google or Microsoft account, please use the session token method below.

Step 2: Session token authentication

Go to https://chat.openai.com/chat log in

  1. Open console with F12

  2. Open Application tab > Cookies

    image

  3. Copy the value for __Secure-next-auth.session-token and paste it into config.json under session_token. You do not need to fill out email and password

    1670250561033

Step 3: Run the bot

  1. Open a terminal or command prompt
  2. Navigate to the directory where you installed the chatGPT Discord bot
  3. Run python main.py to start the bot.

Have A Good Chat !

1670177247310

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.