Skip to content

Latest commit

 

History

History
29 lines (26 loc) · 949 Bytes

File metadata and controls

29 lines (26 loc) · 949 Bytes

Discord (OpenAI) Chatbot

This repository contains the basic code for an AI chatbot using OpenAI's api. You may change whatever you like.

Creating your Bot

  1. You need to get Discord
  2. Next you need to head over to the Developer-Portal, from there you need to create your bot and get your bots token
  3. Rename example.env to .env, and paste your bot token
  4. Your bots gonna need permissions, so stay on Developer-Portal.
  5. Go click OAuth2
  6. Click URL Generator, and sent these permissions.
  • bot
  • Send messages
  • Read Message History

Installation

You need to download some depdendencies.

Install dependencies

initialize the npm install.

npm init -y

install discord.js, open, dotenv

npm install discord.js openai dotenv