Techcoderx and myself both work to operate and maintain an IPFS/discord bot. In this guide I'd like to go over the basics of setting up the bot on a server or home computer. I've ran the bot on devices as small as an Android phone with specs as low as 2gb ram. Minimum requirements are dual core and 2GB of ram.
Install the bot
1.Clone into the repo
2.Change into the application's directory
cd DTube-IPFS-Bot && npm install
3.Edit the auth.json file and add the discord token , you can find out how to create a discord application here. The action to find your token is shown at 0:33.
4.Edit the config file to the specifications you need.
5.Install required libraries, nodejs, ipfs, and pm2.
sudo apt install nodejs
sudo apt install npm
sudo apt install build-essential
sudo npm install pm2@latest -g
sudo snap install ipfs
6.Modify the config file to use a higher port.
And replace with (change port to a number you like in the high range)
How to start the bot
pm2 start bot.js
pm2 start "ipfs daemon --enable-gc"
If pinning large videos crashes the bot, start the bot with this instead
pm2 start bot.js --node-args="--max_old_space_size=15000"
How to stop the bot
pm2 stop bot.js
pm2 stop "ipfs daemon --enable-gc"
If you are stuck looking for the client ID, you can find it on the discord website's developer panel.