Giter Club home page Giter Club logo

0swingpt's Introduction

0swingpt Discord Bot

This is a Discord bot that uses the OpenAI API to generate responses to messages sent in a channel. Additionally, it allows for the creation of public and private channels via a slash command.

Installation

  1. Clone the repository: git clone https://github.com/<your-username>/0swingpt.git
  2. Install dependencies: npm install
  3. Create a .env file in the root directory with the following contents:
TOKEN=<your-bot-token>
ADMIN_ROLE_ID=<your-admin-role-id>
OPENAI_API_KEY=<your-openai-api-key>
  1. Start the bot: npm start

Commands

/setup

This command creates a message with two buttons: "Create Public Channel" and "Create Private Channel". When clicked, these buttons create new text channels in the server.

Usage

To use the bot, simply mention the bot in a channel and type your message. The bot will respond with a generated message based on the previous messages in the channel.

Dependencies

  • discord.js: A powerful library for interacting with the Discord API.
  • dotenv: A zero-dependency module that loads environment variables from a .env file into process.env.
  • openai: A library for interacting with the OpenAI API.
  • eslint: A tool for identifying and reporting on patterns found in ECMAScript/JavaScript code.
  • eslint-config-airbnb-base: Airbnb's base JS ESLint config, following our styleguide.
  • eslint-config-prettier: Turns off all rules that are unnecessary or might conflict with Prettier.
  • eslint-plugin-import: Import with sanity.
  • eslint-plugin-prettier: Runs prettier as an ESLint rule.

0swingpt's People

Contributors

0swin avatar

Watchers

 avatar

0swingpt's Issues

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.