Step by step guide

1

Clone repo

The Github repo is here

2

Setup .env

Add a .env file at the root folder

3

Setup your MongoDB credentials

You can create a free hosted MongoDB database with this tutorial
In your newly created .env file, add the MONGO_DB_CONNEXION variable for your MongoDB connection string.
it should look like:

.env
  MONGO_DB_CONNEXION = "replace by connexionString"
4

Setup your Discord app credentials

You can create a new Discord app from the Discord developper portal
In your newly created .env file, add the DISCORD_CLIENT_ID, DISCORD_CLIENT_SECRET, DISCORD_BOT_SECRET variables. it should look like:

.env
  DISCORD_CLIENT_ID = "replace by CLIENT ID"
  DISCORD_CLIENT_SECRET = "replace by CLIENT SECRET"
  DISCORD_BOT_SECRET = "replace by TOKEN"
5

Configure your Discord app

In the Discord developper portal, select your application.
Then activate :

  • PUBLIC BOT: Make your choice
  • REQUIRES OAUTH2 CODE GRANT: Off
  • PRESENCE INTENT: Off
  • SERVER MEMBERS INTENT: On
  • MESSAGE CONTENT INTENT: On
6

Start your bot

Your ready to start your bot with the yarn start command from the root folder