Project two at Founders and Coders consists of building a discord ai chatbot
These are the main aims of this project:
- Start using a Node.js environment for web development
- Practice using npm, project dependencies and scripts in a Node.js environment
- Incorporate Open AI into the discord bot
- Practice writing asynchronous code, using callbacks and promises
Ahead of running this project the following steps need to be actioned:
- Server ID - through the discord developer portal
- Discord Token - including setting the correct permissions
- OpenAI Key - ensuring you have the right credit available
git clone
the repository & change directory to navigate to itnpm install
to install all packages required - these include discord.js, openai and dotenv- Install additional developer dependencies - this project uses the
ESLint
dependency to help maintain syntax consistency - Follow the Installations & Preparations instructions in the discordjs guide
- Ensure you have a
.env
file and .gitignore file set-up - Inside the
.env
file, fill in the values of the Server ID, Discord Bot Token, and OpenAI API key . - Start the project using
npm start
Now you're ready to meet our bot Sunshine Sierra. Our bot is intended to serve as a positive reinforcement friend inside your discord server. Perfect for using discord as part of your day to day work.
Here are a few examples to try:
\pickup - This will send you a nice uplifting message
Hi Sierra, + Question - This will allow you to ask a question to Sunshine Sierra as the bot will is linked to ChatGPT.
Chatbot Personality - Sunshine Sierra is a supportive and encouraging bot, after every message it will also include a supportive quote
Chatbot Interaction - Ask questions about your feelings and Sunshine Sierra will revert with a helpful quote to suit the moment
This project is run by John and Fahan, feel free to contact us if any questions