Giter VIP home page Giter VIP logo

openai-discord-bot's Introduction

OpenAI Discord Bot

It is a Discord bot that answers questions using the OpenAI API developed with the GPT-3 artificial intelligence algorithm.

Getting Started

1) Clone repository

mkdir openai-discord-bot
cd openai-discord-bot
git clone https://github.com/osman-koc/openai-discord-bot.git

2) Copy env file

cp .env.example .env

3) Create discord bot and OpenAI account

4) Add discord bot to your server

5) Fil keys in env

CLIENT_TOKEN='{discord bot token}'
OPENAI_API_KEY='{openai.com api key}'
ROBOT_USER_ID='{discord bot user id}'

6) Run

  • Manuel
npm install
npm run dev
  • Docker
npm run docker 
//OR
docker build -t openai-discord-bot .
docker run -d openai-discord-bot

Example

DiscordScreenshot

openai-discord-bot's People

Contributors

osman-koc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

openai-discord-bot's Issues

TypeError: Cannot read properties of undefined (reading 'cache')

TypeError: Cannot read properties of undefined (reading 'cache')
C:\Users\Administrator\openai-discord-bot\node_modules\discord.js\src\client\actions\MessageCreate.js:11
const existing = channel.messages.cache.get(data.id);
^

TypeError: Cannot read properties of undefined (reading 'cache')
at MessageCreateAction.handle (C:\Users\Administrator\openai-discord-bot\node_modules\discord.js\src\client\actions\MessageCreate.js:11:41)
at module.exports [as MESSAGE_CREATE] (C:\Users\Administrator\openai-discord-bot\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (C:\Users\Administrator\openai-discord-bot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
at WebSocketShard.onPacket (C:\Users\Administrator\openai-discord-bot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
at WebSocketShard.onMessage (C:\Users\Administrator\openai-discord-bot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
at WebSocket.onMessage (C:\Users\Administrator\openai-discord-bot\node_modules\ws\lib\event-target.js:132:16)
at WebSocket.emit (node:events:513:28)
at Receiver.receiverOnMessage (C:\Users\Administrator\openai-discord-bot\node_modules\ws\lib\websocket.js:1068:20)
at Receiver.emit (node:events:513:28)
at Receiver.dataMessage (C:\Users\Administrator\openai-discord-bot\node_modules\ws\lib\receiver.js:517:14)

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.