Code Monkey home page Code Monkey logo

discord-gpt3-bot's Introduction

Discord GPT-3 Bot

This code sets up a bot for the Discord chat platform using the discord.py library with slash-commands.

How to use

To use this bot, use /ask. The bot will send a request to the OpenAI API to generate a response based on the prompt you provide.

The message the user feeds into the bot is checked against the OpenAI moderation API to ensure that it is appropriate. If the message the user posted is flagged as inappropriate, the bot sends a message indicating that it cannot respond.

Otherwise, it sends the generated response to the user. The API key for both OpenAI services are NOT provided in the code and will need to be put in by the user. The bot token will also need to be added by the user, as it is linked directly to their discord bot.

Installation

Before running the bot, you will need to install necessary dependencies, which can be installed using:

pip install -r requirements.txt

Configuration

Before running the bot, you will need to configure config.json with the following data:

  • Discord bot token
  • OpenAI API key
  • Path for message logging

Running the bot

To run the bot, use the following command:

python bot.py

This will start the bot and allow it to listen for commands and generate responses.

License

discord-gpt3-bot's People

Contributors

joeya1ds avatar strixziv avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

strixziv

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.