No description
  • JavaScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2023-02-14 14:41:38 -05:00
example.env Create example.env 2023-02-14 13:21:09 -05:00
index.js Create index.js 2023-02-14 13:20:05 -05:00
package.json Create package.json 2023-02-14 13:18:24 -05:00
README.md Update README.md 2023-02-14 14:41:38 -05:00

NLPCloud GPT Discord Chatbot

Get API Token from nlpcloud: https://nlpcloud.com/home/token

Create a discord bot and get the token: https://discord.com/developers/applications The bot just needs basic permissions to read/send messages

Note: you must use the discord reply feature when talking to the bot! (hover over a message and click the reply arrow)

enter both tokens into .env (example at example.env file)

How to start

npm install

node index.js

Systemd service

sudo nano /etc/systemd/system/chatbot.service
[Unit]
Description=chatbot

[Service]
Type=simple
Restart=always
User=user
Group=user
WorkingDirectory=/home/user/chatbot
ExecStart=/usr/bin/node /home/user/chatbot/index.js

[Install]
WantedBy=multi-user.target

replace the User/Group with your user and change the WorkingDirectory and ExecStart to your location

sudo systemctl enable --now chatbot.service

Credits: https://nlpcloud.com/build-gpt-j-gpt-neox-discord-chatbot-with-nlpcloud.html