Updated README

This commit is contained in:
ThunderE75 2021-07-22 22:12:08 +05:30
parent 9e6f890725
commit 047da29f25

126
README.md
View file

@ -1,50 +1,114 @@
# cath.exe <img src = "https://cdn.discordapp.com/avatars/800966959268364288/36d6967911a31a638d65d1da472d2e14.png?size=1024" width = "45"> # CATH.EXE TEMPLATE
cath.exe is a CODM-theme based Discord Bot with many categories of commands like Moderation, Music and Economy. It is an open source project based on Project Lighthouse by path.exe, written in node.js(JavaScript), mainly using discord.js and mongoose module.<br><br>If you like this bot, feel free to **star** and **fork** the repository!<br> <!-- header -->
Click [here](https://discord.com/oauth2/authorize?client_id=800966959268364288&permissions=4231314550&scope=bot%20applications.commands) to invite cath.exe <img src = "https://media.discordapp.net/attachments/842014909264953354/867806346593042483/Cath-temp-banner.png?width=1244&height=415">
![Support Server](https://img.shields.io/discord/718762019586572341?color=46828d&label=Support&style=for-the-badge) *This is a Bot Template based on Cath.exe, This templated **does not** conatain any data from Project Lighthouse. For Call of duty mobile stats invite the main instance using the **INVITE ME** badge.*
![Repo Stars](https://img.shields.io/github/stars/night0721/cath.exe?color=46828d&style=for-the-badge)
# How to deploy the bot? <img src = "https://cdn.discordapp.com/emojis/740978278055280722.png" width = "40"> **Cath.exe** is a Multipurpose Discord Bot with many features that include but are not limited to Moderation, Music and Economy. The Call of Duty Stats are courtesy of [**Project Lighthouse**](https://discord.gg/ARNFCu9NxK) by [**Path.exe**](https://www.youtube.com/channel/UC0hvUWYhyx_DOEBzLWEJxsw).<br><br>
If you like this bot, feel free to <img src = "https://discord.com/assets/141d49436743034a59dec6bd5618675d.svg" width = "16"> **Star** and **fork** this repository.<br><br>
1. Clone the repository <!-- Main Badges -->
[![inviteme](https://badgen.net/badge/Invite%20Me/Online/5865F2?icon=discord&color=5865F2&style=for-the-badge&scale=1.4)](https://discord.com/oauth2/authorize?client_id=800966959268364288&permissions=4231314550&scope=bot%20applications.commands)
[![Support Server](https://img.shields.io/discord/718762019586572341?label=Support%20Server&logo=Discord&colorB=5865F2&style=for-the-badge&logoColor=white) ](https://discord.gg/SR7TeNJG67)
![Repo Stars](https://img.shields.io/github/stars/night0721/cath.exe?logo=github&color=5865F2&style=for-the-badge)
<!-- Build with badges -->
## Build with:
[![JavaScript](https://img.shields.io/badge/JavaScript-F7DF1E?style=for-the-badge&logo=javascript&logoColor=black)](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
[![node](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white)](https://nodejs.org/en/)
[![npm](https://img.shields.io/badge/npm-CB3837?style=for-the-badge&logo=npm&logoColor=white)](https://www.npmjs.com/)
[![MongoDB](https://img.shields.io/badge/MongoDB-4EA94B?style=for-the-badge&logo=mongodb&logoColor=white)](https://mongodb.com/)
<img src ="https://forthebadge.com/images/badges/built-with-love.svg" width = "122"><br>
<!-- # Project Lighthouse
<img src = "https://cdn.discordapp.com/attachments/540218400413188116/867689582706294794/lighthouse.gif" width = "1298" hight = "433"> -->
<!-- ## What is Project Lighthouse? -->
# <img src = "https://discord.com/assets/a6d05968d7706183143518d96c9f066e.svg" width = "26"> Deploy Your Own Instance Locally
## Prerequisite
Download all these programs on your local machine by clicking on the badge & following the standard installing procedure. You can use any IDE but we recommand VS Code.
[![git](https://badgen.net/badge/icon/git?icon=git&label&color=5865F2&style=for-the-badge&scale=1.4)](https://git-scm.com/downloads)
[![Open in Visual Studio Code](https://img.shields.io/badge/Visual_Studio_Code-5865F2?style=for-the-badge&logo=visual%20studio%20code&logoColor=white)](https://code.visualstudio.com/Download)
[![node](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white)](https://nodejs.org/en/download/)
<!-- [![MongoDB](https://img.shields.io/badge/MongoDB-4EA94B?style=for-the-badge&logo=mongodb&logoColor=white)](https://www.mongodb.com/cloud/atlas/lp/try2) -->
## Step by Step Walkthrough
### [![YouTube Tutorial](https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge&logo=youtube&logoColor=white)](https://youtu.be/_D5xG7XoF88)
1. Clone this repository
```cmd ```cmd
git clone https://github.com/night0721/cath.exe git clone https://github.com/night0721/cath.exe
(or)
gh repo clone night0721/cath.exe
``` ```
ro 2. Rename the [`.env.example`<span>&#10138;</span>
](https://github.com/night0721/cath.exe/blob/main/.env.example) file to `.env`<br>
2.Create a .env file from <a href = "https://github.com/night0721/cath.exe/blob/main/.env.example">.env.example</a><br><br> 3. Create an application from [Discord Developer Portal](https://discord.com/developers/applications), then copy the 3. Create an application from Discord Developer's Portal then copy these things into the `.env` file.<br>
[![Open Discord Developer Portal](https://badgen.net/badge/icon/discord?icon=discord&label=Developer%20Portal&color=5865F2&style=for-the-badge)](https://discord.com/developers/applications)
- **Bot Token**<br>
- **Application ID** (Client ID)<br>
- **Client Secret**<br>
4. To view the logs, Create 5 Channels & 5 Webhooks in *your* **Discord Server:** corresponding to these logs.
- **Server Log** (Log new Server Added/Premium Server)<br>
- **Error Log** (Log Unhandled Rejection Error)<br>
- **Ready Log** (Log when bot online)<br>
- **Command Log** (Log command usage)<br>
- **DM Log** (Log when someone send DM to Bot)<br>
- Bot Token<br> *You can also just use one Channel & one Webhook for everything but it will be really inconvenient.*
- Application ID(Client ID)<br>
- Client Secret<br><br>
4. Create a MongoDB Connection URI from [here](https://www.mongodb.com)<br><br> <img src = "https://media.discordapp.net/attachments/540218400413188116/867797464169709661/unknown.png" width="640"> <br>
5. Create 5 Webhooks in**Your Discord Server**:<br>
- Server Log(Log new Server Added/Premium Server)<br> 5. One by one paste the webhook url in a web browser & copy the **ID** & the **TOKEN** and paste it in the corresponding feilds in the `.env` file. <br>
- Error Log(Log Unhandled Rejection Error)<br>
- Ready Log(Log when bot online)<br>
- Command Log(Log command usage)<br>
- DM Log(Log when someone send DM to Bot)<br><br><img src = "https://media.discordapp.net/attachments/838006493361471508/853217575986659328/unknown.png" width="300"><br>
6. Paste the IDs, Tokens and the Webhooks into the `.env` respectively<br><br> 6. After this, you need to install all dependencies by using this command. This will takes a few minutes.
7. After you have done the above steps, run the commands in your **Command Prompt** or **PowerShell**
```cmd ```cmd
npm install npm i
node index.js ```
```
# Reporting Bugs <img src = "https://cdn.discordapp.com/emojis/841195615458951168.png" width = "40"> 7. Now, to start the bot use this command in the Terminal.
```cmd
node .
```
You can report bugs or issues by opening a issue in this repository or join the [support server](https://discord.gg/SbQHChmGcp) ## Additional Steps
# Support <img src = "https://cdn.discordapp.com/emojis/841196992385253408.png" width = 40> To enable the Economy Commands, you need to Setup a MongoDB Database. You can also watch a video guide [here](https://youtu.be/dQw4w9WgXcQ).
1. Create a Free [MongoDB Account](https://www.mongodb.com/cloud/atlas/register)
2. Click on the `Create a New Database`.
3. Selct the `CREATE` option in the **Shared** Teir.
4. Select a `Cloud Provider & Region` that is geographically closer to the average user that will use the bot. *This will effect the responce time of the bot.*
5. Then you can Name your Cluster, after that click on `Create Cluster`. *This will take a couple of minutes.*
6. Then click on `Database Access` from the sidebar & then click on `Add New Database User`.
7. Under the `Password - Authentication Method`. Enter a username & password. then click on `Add User`.
8. After that, click on `Network Access` from the sidebar & then click on `Add IP Address`. & click on the `Add Current IP Address` Then click on `Confirm`.
9. now, Click on `Database` from the sidebar & then click on `Connect`.
10. Then on click on `Connect your Application`. & Copy the link.
11. The paste that link in the `MONGODB` feild in the `.env` file.
12. Now you need to modify that link,
- Replace `<password>` with the password for the user that you created in **Step 7**.
- Replace `myFirstDatabase` with the name of the Database that you named in **Step 5**.
13. That's it!
# Support, Feature Request & Bug Reports
## <img src = "https://cdn.discordapp.com/emojis/867093614403256350.png?v=1" width = 18> Support & Feature Request
Join the official [Support Server](https://discord.gg/SbQHChmGcp) on Discord & we will be happy to assist you. <br>
To Request new features contact us on Discord using the support server.
## <img src = "https://cdn.discordapp.com/emojis/867093601962950666.png?v=1" width = "18"> Report Bugs
You can report bugs or issues by opening a issue in this repository. Alternatevely you can also contact us on Discord using the support server.
[![Support Server](https://img.shields.io/discord/718762019586572341?label=Support%20Server&logo=Discord&colorB=5865F2&style=for-the-badge&logoColor=white) ](https://discord.gg/SR7TeNJG67)
If you faced any error, please join the [support server](https://discord.gg/SbQHChmGcp) and I will be here for help