Skip to content

Latest commit

 

History

History
84 lines (60 loc) · 5.48 KB

README.md

File metadata and controls

84 lines (60 loc) · 5.48 KB

Discord Conversation Bot

CI CodeQL GitHub tag (with filter) GitHub repository size GitHub release downloads GitHub commit activity

This is a bot for Discord that uses OpenAI's Chat Completion API (a.k.a. ChatGPT) to have conversations with members in a server.

Model support currently includes GPT-3.5 (gpt-3.5-turbo) and GPT-4 (gpt-4).

📜 Background

I simply made this because it seems like every other developer is experimenting with AI right now, and since OpenAI recently announced their chat completion API, I thought now is probably a better time than never. There's no other motiviation behind this than just wanting an excuse to play around with ChatGPT from a development view.

📥 Usage

NOTE: OpenAI's Chat Completion API is not free, though still quite cheap, and thus requires setting up a recurring billing account.

NOTE: The GPT-4 model is currently in a limited beta, if you have not been granted access then your Discord server members will only be able to use the GPT-3.5 model.

📦 Release

  1. Download & extract the latest stable release.
  2. Open a terminal in the newly created directory.
  3. Install production dependencies via npm install --omit=dev.
  4. Create an environment variables file (.env) and add the required properties.
  5. Launch via node ..
  6. Use the /conversation slash command in your Discord server.

🐳 Docker

  1. Download the latest stable Docker image for your platform.
  2. Create a container via docker container create --name discord-conversation-bot --interactive --tty --restart on-failure ghcr.io/discord-conversation-bot.
  3. Start the container via docker container start discord-conversation-bot.
  4. Use the /conversation slash command in your Discord server.

⚙️ Configuration

Environment variables are used to configure functionality. The following are required:

🏗️ Building

  1. Clone this repository via git clone https://github.com/viral32111/discord-conversation-bot.
  2. Open a terminal in the repository's directory.
  3. Install production & development dependencies via npm install.
  4. Create an environment variables file (.env) and add the required properties.
  5. Launch via npm start.
  6. Use the /conversation slash command in your Discord server.

🔗 Useful Links

⚖️ License

Copyright (C) 2023 viral32111.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses.