1 |
|
|
2 |
<p align="center"> |
<p align="center"> |
3 |
<img src="https://res.cloudinary.com/rakinar2/image/upload/v1659628446/SudoBot-new_cvwphw.png" height="200px" width="200px"> |
<img src="https://res.cloudinary.com/rakinar2/image/upload/v1659628446/SudoBot-new_cvwphw.png" height="200px" width="200px"> |
4 |
</p> |
</p> |
31 |
|
|
32 |
### Setup for Custom Hosting |
### Setup for Custom Hosting |
33 |
|
|
34 |
|
#### Requirements |
35 |
|
* NodeJS version 16 or higher |
36 |
|
* MongoDB version 5.0 or higher |
37 |
|
* A Discord API application token with proper setup |
38 |
|
|
39 |
|
#### Optional Services |
40 |
|
* Cat and dog API Token (for fetching cat and dog images using `cat` and `dog` commands, the tokens can be obtained at [thecatapi.com](https://thecatapi.com) and [thedogapi.com](https://thedogapi.com)) |
41 |
|
* Pixabay API Token (can be obtained [here](https://pixabay.com/api/docs/)) |
42 |
|
* A Discord Webhook URL for sending error reports |
43 |
|
* A JWT Secret for the API services (if you don't have a API secret, you can run `openssl rand -base64 10` to generate a random base64 string and use it as secret) |
44 |
|
|
45 |
First, download the latest release or clone the repo by running: |
First, download the latest release or clone the repo by running: |
46 |
|
|
47 |
``` |
``` |
48 |
git clone https://github.com/onesoft-sudo/sudobot |
git clone https://github.com/onesoft-sudo/sudobot |
49 |
``` |
``` |
50 |
|
|
51 |
Then go inside the project directory, and run the following commands: |
Then go inside the project directory, and run the following command: |
52 |
|
|
53 |
``` |
``` |
|
mkdir config tmp storage logs |
|
|
touch logs/join-leave.log |
|
|
echo "{}" > config/snippets.json |
|
|
cp sample-config.json config/config.json |
|
54 |
npm install -D |
npm install -D |
55 |
``` |
``` |
56 |
|
|
76 |
|
|
77 |
**Note**: `...` means other options that exist in the config, you can edit them to customize the settings, but not required. |
**Note**: `...` means other options that exist in the config, you can edit them to customize the settings, but not required. |
78 |
|
|
79 |
|
Then copy the `.env.example` file to `.env` and open it, edit the information (such as bot token. MongoDB URI, etc) as needed. |
80 |
|
|
81 |
Build the project: |
Build the project: |
82 |
|
|
83 |
``` |
``` |
109 |
### Support |
### Support |
110 |
|
|
111 |
- **Email**: [email protected] |
- **Email**: [email protected] |
112 |
- **Discord Servers*: [The Everything Server](https://discord.gg/Km7ZcfXT6P), [Support Server](https://discord.gg/892GWhTzgs) |
- **Discord Servers**: [The Everything Server](https://discord.gg/Km7ZcfXT6P), [Support Server](https://discord.gg/892GWhTzgs) |