- The discord.js dependency must be installed using the npm install discord.js command
- The mongodb dependency must be installed using the command npm install mongodb
- The URI of the remote MongoDB database must be replaced in the line const uri = "mongodb+srv://<your_mongo_db_uri_here>";
- The database login information (username, password, etc.) must be replaced in the URI.
- A valid Discord API key must be replaced in the client.login('<your_discord_api_key_here>');.
- The MongoDB database collection architecture, such as field names (reason, appearance, etc.), must match that used in the code.
- Log into Discord and go to the Developer Center.
- Click on "Applications" in the left menu.
- Click on "Create an application".
- Give your application a name, then click "Create".
- Click on "Bot" in the left-hand menu.
- Click on "Add a Bot".
- You will now see the API Key at the top of the page.