Installation: WSL - Ubuntu 22.04:
sudo apt install npm
shutdown -r now # THIS DOESN'T REALLY WORK, BUT YOU NEED TO EXIT THE SHELL AN LOG BACK IN -- cal also do an EXPORT
npm init -y
npm install discord.js
npm -v && node -v
9.5.0
18.15.0
on Debian 11 bullseye:
sudo curl -fsSL https://deb.nodesource.com/setup_16.x | sudo bash -
sudo apt install nodejs
npm -v && node -v
8.19.3
16.19.1
To run the bot (this is the javascript code that I wrote to run the bot):
node bot.js
bot is ready