A template for a Discord.js bot that includes command and event handlers as well as environment variables and ESLint.
A star is always appreciated if you find this template useful for you!
Make sure you have Node.js installed as well as Git SCM Windows | Mac | Linux if you're going to go this route. Otherwise, simply clone the repo or download it and unzip it to a folder on your desktop.
$ git clone git@github.com:acollierr17/discord.js-template.git # or fork
$ cd discord.js-template
$ npm install
Rename .env.example
to .env
and update the file with its respective details. Afterward, start the bot.
$ npm start
Your Discord.js bot should now be live! (Check the console if you need to double check anything).
With the included Procfile
you have the option of deploying the bot to Heroku.
Make sure you have Heroku CLI installed before proceeding. You will need to download the Heroku Node.js buildpack first before moving along.
$ heroku create --buildpack https://github.com/heroku/heroku-buildpack-nodejs.git
Once the buildpack is installed, you may proceed with deployment.
$ heroku create
$ git push heroku master
$ heroku open
or
Credits to Joma for the README template