Coder Social home page Coder Social logo

chatgpt-discord-bot's Introduction

Documentation of the bot

This project is a simple (very very simple) discord bot that implements a OpenAI ChatGPT to answer questions. Also is a bootstrap to start a chatbot with OpenAI.

Requirements

  • NodeJS v19.3.0 (npm v9.2.0)

Install

  • Clone the repository
  • Install the dependencies with npm install
  • Create a .env file following the .env.example file
  • Fill the .env file with your OpenAI API Key and Discord Bot Token
  • Run the bot with node index.js

If you are familiar with docker, you can run the bot with docker compose, just run docker-compose up -d and the bot will be running.

Usage

  • In index.js file in line 3 you can set what channel in what guild the bot will listen to, set your guild id and channel id like in the example below:
const preferences = {
    "guildId": "ChannelId",
};
  • Now go to your discord server and the channel of your choice and starting talking with bot.

Other information

This repository has another branch with database implementation using supabase, but is under development. If you want to contribute to this project, feel free to open a pull request.

Any questions, feel free to call me on Discord

chatgpt-discord-bot's People

Contributors

nicollaspetrelli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.