Coder Social home page Coder Social logo

lawsssscat / gpt-discord-bot-js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from itzarshia/gpt-discord-bot

0.0 0.0 0.0 3.64 MB

🧠 Example Discord Bot written in JavaScript that uses OpenAIs models such as `text-davinci-003`, `Dall∙E`, and `text-moderation-004` with many features such as ChatGPT-style conversation, image generator, AutoMod and more!

License: MIT License

JavaScript 100.00%

gpt-discord-bot-js's Introduction

Chat GPT Discord Bot

GPT Discord Bot is the original Discord AI bot written in JavaScript, using the Discord.js V14 library powered by OpenAI's models. It has different features such as answering to all of your questions or draw your imaginations and even translate your prompts from any language to any other language you want and also an configurable Auto Moderation system powered by AI which watch all of your server messages (if you want, you can turn it off/on) and report flagged messages to Admins and they can moderate it and other features which you can see example in Screenshots!

🚧 Requirements

  1. Discord Bot Token Guide
    1.1. Enable "Message Content Intent" and "Server Members Intent" in Discord Developer Portal
  2. OpenAI API Key
  3. Node.js 16.9.0 or higher

🚀 Getting Started

⚙️ Configuration

Go to config.json in configs folder and fill out the values:

{
    "Prefix": "Put anything you want as prefix",
    "MainColor": "Put any #HexCode you want for embeds color",
    "ErrorColor": "Put any #HexCode you want for embeds color when there is an error",
    "ClientID": "Put your Bot ID/Client ID here",
    "Token": "Put your Bot Token here",
    "OpenAIapiKey": "Put your Open AI API Key here"
}

⚠️ Note: Never commit or share your token publicly ⚠️

and if you want to use chatbot or moderation model fill and config chatbot.js and moderation.js in configs folder and (Information on how to configure them is available in the files themselves)

🧠 installation

Open your terminal and install required packages with

npm install

After installation finishes run node register.js to deploy slash commands and then run node index.js in terminal to start the bot.

💫 Features

Commands

Ask : Answers your questions with Text-Davinci-003!

Imagine : Draw your imaginations with Dall∙E!

Optimize : Optimizes your imaginations to get better response with imagine command with Text-Davinci-003!

Translate : Translate your texts in any language to any language you want with Text-Davinci-003.

Systems

ChatBot : A Channel where you can talk to the bot and have ChatGPT-Style conversation with Text-Davinci-003. (It has a temporary memory so that it can remember the contents for a short time)

Auto Moderation : An Auto Mod system which checks all of your server messages and send a log for your Admins if a message content complies with OpenAI's usage policies with Text-Moderation-004 (moderation model is free to use and you can config it as much as you want)

📸 Screenshots

Ask imagine Translate Conversation Auto Mod

❤️ Donations

You can support me by donating if you like the project!

Only available for Iranians :(

Made with ❤️ and JavaScript, Don't Forget to ⭐

gpt-discord-bot-js's People

Contributors

itzarshia avatar kav-k 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.