> ## Documentation Index
> Fetch the complete documentation index at: https://blog.cytric.nl/llms.txt
> Use this file to discover all available pages before exploring further.

# Mongodb discordjs

[![Cytric.png](https://i.postimg.cc/jCVhPrnp/Cytric.png)](https://postimg.cc/N24TvS4D)

# How to Set Up the Template Bot on Cytric Using GitHub

## Step-by-Step Instructions

### 1. Log into the Cytric Panel and *Head over to the Startup page*

* Go to [Cytric Panel](https://panel.Cytric.nl/) and log into your account.

### 2. Clone the GitHub Repository

* **GIT REPO ADDRESS**:
  * Enter the GitHub repository link.
  * Repo Link: `https://github.com/Cytric/Discord-JS-MongoDB-Template`
  * **Description**: This is the GitHub repository to clone.

<a href="https://github.com/Cytric/Discord-JS-MongoDB-Template">
  <img src="https://mintcdn.com/cybrance/WrEjUbaSohrsqkSD/images/git.png?fit=max&auto=format&n=WrEjUbaSohrsqkSD&q=85&s=4816b2bd3b6c94210d79042783dedb6a" alt="git-Image" width="380" height="100" data-path="images/git.png" />
</a>

### 3. Select the Install Branch

* **INSTALL BRANCH**:
  * Enter `main`.
  * **Description**: The branch of the bot to install.

<a href="https://github.com/Cytric/Discord-JS-MongoDB-Template">
  <img src="https://mintcdn.com/cybrance/WrEjUbaSohrsqkSD/images/branch.png?fit=max&auto=format&n=WrEjUbaSohrsqkSD&q=85&s=7e66ac27c1bfa5b6c5197bc1371a8c41" alt="branch-Image" width="380" height="100" data-path="images/branch.png" />
</a>

### 4. User Uploaded Files

* **USER UPLOADED FILES**:
  * Disable to skip all the install stuff.
  * **Description**: Skip all the install stuff if you are letting a user upload files. `0 = false` (default), `1 = true`.

<a href="https://github.com/Cytric/Discord-JS-MongoDB-Template">
  <img src="https://mintcdn.com/cybrance/WrEjUbaSohrsqkSD/images/uploadedFiles.png?fit=max&auto=format&n=WrEjUbaSohrsqkSD&q=85&s=839a87d679b4cda4844b638431f0d793" alt="files-Image" width="380" height="100" data-path="images/uploadedFiles.png" />
</a>

### 5. Auto Update

* **AUTO UPDATE**:
  * Enable or disable based on your preference.
  * **Description**: Pull the latest files on startup when using a GitHub repo.
    *Note: After manually changing the code in the panel - updates made on the original repository will be blocked.*

<a href="https://github.com/Cytric/Discord-JS-MongoDB-Template">
  <img src="https://mintcdn.com/cybrance/WrEjUbaSohrsqkSD/images/autoUpdate.png?fit=max&auto=format&n=WrEjUbaSohrsqkSD&q=85&s=7786a63563bfb7dfb8d892981790cbda" alt="update-Image" width="380" height="100" data-path="images/autoUpdate.png" />
</a>

### 6. Specify the Bot Entry Point

* **BOT JS FILE**:
  * Enter `src/index.js`.
  * **Description**: The file that starts the bot.

<a href="https://github.com/Cytric/Discord-JS-MongoDB-Template">
  <img src="https://mintcdn.com/cybrance/WrEjUbaSohrsqkSD/images/src.png?fit=max&auto=format&n=WrEjUbaSohrsqkSD&q=85&s=b2218930b26144df55cac4fcd0ab572a" alt="src-Image" width="380" height="100" data-path="images/src.png" />
</a>

### 7. Install Additional Node Packages

* **ADDITIONAL NODE PACKAGES**:
  * Enter `discord.js axios discord-logs mongodb mongoose@6.0.2 dotenv canvas @napi-rs/canvas os discord-gamecord dotenv`.
  * **Description**: Install additional node packages. Use spaces to separate.

<a href="https://github.com/Cytric/Discord-JS-MongoDB-Template">
  <img src="https://mintcdn.com/cybrance/WrEjUbaSohrsqkSD/images/packages.png?fit=max&auto=format&n=WrEjUbaSohrsqkSD&q=85&s=676e72b3a3ab5276936cf67e2de882c9" alt="packages-Image" width="380" height="100" data-path="images/packages.png" />
</a>

### 8. GitHub Authentication

* **GIT USERNAME**: - Enter `Cytric` as the GitHub username. - **Description**: Username to authenticate with Git.

<a href="https://github.com/Cytric/Discord-JS-MongoDB-Template">
  <img src="https://mintcdn.com/cybrance/WrEjUbaSohrsqkSD/images/username.png?fit=max&auto=format&n=WrEjUbaSohrsqkSD&q=85&s=7f0dcad409ebaa3d84a7d0eeac7b8e7d" alt="username-Image" width="380" height="100" data-path="images/username.png" />
</a>

* **GIT ACCESS TOKEN** `(Not needed)`:
  * Enter your GitHub Personal Access Token if you are using it out of a own private repository.
  * **Description**: Password to use with Git but with a private repository. It's best practice to use a Personal Access Token. [Create a GitHub Personal Access Token](https://github.com/settings/tokens).

<a href="https://github.com/Cytric/Discord-JS-MongoDB-Template">
  <img src="https://mintcdn.com/cybrance/WrEjUbaSohrsqkSD/images/GITaccess.png?fit=max&auto=format&n=WrEjUbaSohrsqkSD&q=85&s=fd4da57e5ac57a051aa2c7bffd42b8e1" alt="GITaccess-Image" width="380" height="100" data-path="images/GITaccess.png" />
</a>

### 9. Uninstall Node Packages

* **UNINSTALL NODE PACKAGES**:
  * Leave this field empty or enter the packages you want to uninstall.
  * **Description**: Uninstall node packages. Use spaces to separate.

<a href="https://github.com/Cytric/Discord-JS-MongoDB-Template">
  <img src="https://mintcdn.com/cybrance/WrEjUbaSohrsqkSD/images/uninstall.png?fit=max&auto=format&n=WrEjUbaSohrsqkSD&q=85&s=ef54d6b04432b47b49586cae4d4f4be9" alt="uninstall-Image" width="380" height="100" data-path="images/uninstall.png" />
</a>

## MongoDB Setup Instructions

### Step 1: Follow our Cytric MongoDB Guide

* Go to [MongoDB Guide](https://www.mongodb.com/resources/products/fundamentals/clusters) and follow the prompts to set up a new cluster.

### Step 2: Update Your .env file

* Edit your Discord Bot Token and MongoDB URL in the `.env` file:
  ```env theme={null}
  token=your_discord_bot_token
  MONGODBURI=your_mongodb_connection_string
  ```

## Need support for setting up your bot?

[support@Cytric.nl](mailto:support@Cytric.nl)
