DiscordJS Bot Template

Looking for a way to get started with a template in DiscordJS?

DiscordJS Bot Template

Welcome to the bot template on DiscordJS, that's right, you won't have to suffer anymore to learn the basics of how to program your own bot on discord! This template aims to explain as much as possible how the README and comments within the codes and help you better understand how the programming logic for DIscordJS works.

DiscordJS Official Links

V14 Guide

Click here to be redirected to the website!

Documentation

Click here to be redirected to the website!

Important to Know

This template only explains the basics of how to create your 1 command and call it, but I recommend you read the documentation and guides and delve into JavaScript to learn how to create any system from scratch.

Installation

1. Install the project code on your machine or use Github Desktop;

2. Using NodeJS, run the following command in the terminal:

npm install

3. Wait until all dependencies are installed;

4. Create the .env file in the main project folder;

Env Example

KeyValueRequired/Optional
client_tokenYOUR_BOT_TOKENRequired
mongoose_uriYOUR_URI_MONGOOSEOptional

5. Now run the following command in your terminal! (Remember to have your terminal in the main project folder)

node index.js

Inserting the Mongoose Database

You will not be taught how to completely configure your mongoose database for the Project, but I recommend that you read the Official Documentation which explains step by step how to do this, and the creation of schemas.

Insert the following code into the index.js file

npm install mongoose

const mg = require('mongoose');mg.set("strictQuery", true);
mg.connect(process.env.mongoose_uri, {}).then(() => {
console.log("Logged to Database!")
});

Contributions are welcome! If you have any suggestions or improvements, feel free to open an issue or submit a pull request.

🍄 Made By IHeenrique

Contacts

If you are interested in my work, please contact me via Discord or Email! My minimum price is 5 Dollars.