- Use
cp .env.example .envto create the .env file. - Fill out the
.envfile with the data needed. - Go to
ecosystem.config.jsand provide thenameyou want to name the PM2 process (default:TS-Bot) - More info on .env:
"TOKEN" is your Discord bot's token from the Discord developer portal (here: https://discord.com/developers/applications)
"timeZone" is the timezone you want the logs and other stuff to be in when posting to the console, etc. (full list here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)
"PREFIX" is the prefix you want to be used for prefix commands (ex: `!ping`)- Install the packages with
npm i(wait for that to finish) - Install PM2 globally (
npm i pm2 -g) - Start the bot with
pm2 start ecosystem.config.js - Use
pm2 lorpm2 logs <name>to view the logs for the bot.
npm i- Install the packagesnpm run deploy- Registers the bot's /commands to Discordnpm run ds- Build and run the bot.