1 |
|
2 |
<p align="center"> |
3 |
<img src="https://res.cloudinary.com/rakinar2/image/upload/v1659628446/SudoBot-new_cvwphw.png" height="200px" width="200px"> |
4 |
</p> |
5 |
|
6 |
<h1 align="center">SudoBot</h1> |
7 |
|
8 |
<p align="center"> |
9 |
<a href="https://github.com/onesoft-sudo/sudobot/actions/workflows/build.yml"><img src="https://github.com/onesoft-sudo/sudobot/actions/workflows/build.yml/badge.svg" alt="Build"></a> |
10 |
<img src="https://img.shields.io/github/license/onesoft-sudo/sudobot?label=License" alt="GitHub"> |
11 |
<img src="https://img.shields.io/github/package-json/v/onesoft-sudo/sudobot?label=Version" alt="GitHub package.json version"> |
12 |
<img src="https://img.shields.io/github/commit-activity/w/onesoft-sudo/sudobot?label=Commit%20Activity" alt="GitHub commit activity"> |
13 |
<a href="https://discord.gg/892GWhTzgs"><img src="https://img.shields.io/discord/964969362073198652?label=Support+Chat" alt="Discord"></a> |
14 |
</p> |
15 |
|
16 |
<p align="center"> |
17 |
A Discord bot for moderation purposes. |
18 |
</p> |
19 |
|
20 |
### Features |
21 |
|
22 |
- Strong automoderation system with tools like anti-spam and anti-raid ([Click here](https://onesoft-sudo.github.io/sudobot/automoderation/#what-can-the-bot-do) to see the full list) |
23 |
- Useful moderation tools and utilities |
24 |
- Secure |
25 |
- Fun commands |
26 |
- Active development & support |
27 |
|
28 |
### Getting started |
29 |
|
30 |
You can request an invite for SudoBot [here](https://sudobot.everything-server.ml/). |
31 |
Alternatively, you can create your own Discord API application and then host SudoBot. |
32 |
|
33 |
### Setup for Custom Hosting |
34 |
|
35 |
#### Requirements |
36 |
* NodeJS version 16 or higher |
37 |
* MongoDB version 5.0 or higher |
38 |
* A Discord API application token with proper setup |
39 |
|
40 |
#### Optional Services |
41 |
* 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)) |
42 |
* Pixabay API Token (can be obtained [here](https://pixabay.com/api/docs/)) |
43 |
* A Discord Webhook URL for sending error reports |
44 |
* 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) |
45 |
|
46 |
First, download the latest release or clone the repo by running: |
47 |
|
48 |
``` |
49 |
git clone https://github.com/onesoft-sudo/sudobot |
50 |
``` |
51 |
|
52 |
Then go inside the project directory, and run the following command: |
53 |
|
54 |
``` |
55 |
npm install -D |
56 |
``` |
57 |
|
58 |
Then open up the `config/config.json` file and change at least the following: |
59 |
|
60 |
```json |
61 |
{ |
62 |
"global": { |
63 |
"id": "set your home guild id", |
64 |
"owners": ["set owner user ids here"], |
65 |
... |
66 |
}, |
67 |
"guild id here": { |
68 |
"prefix": "-", |
69 |
"mod_role": "the mod role, users having it will be able to use the bot", |
70 |
"gen_role": "general role id, which all users have", |
71 |
"mute_role": "the muted role id", |
72 |
"admin": "the admin role id. users having it will be immune to sudobot.", |
73 |
... |
74 |
} |
75 |
} |
76 |
``` |
77 |
|
78 |
**Note**: `...` means other options that exist in the config, you can edit them to customize the settings, but not required. |
79 |
|
80 |
Then copy the `.env.example` file to `.env` and open it, edit the information (such as bot token. MongoDB URI, etc) as needed. |
81 |
|
82 |
Build the project: |
83 |
|
84 |
``` |
85 |
npm run build |
86 |
``` |
87 |
|
88 |
Deploy slash commands globally: |
89 |
|
90 |
``` |
91 |
node deploy-commands.js |
92 |
``` |
93 |
|
94 |
Start the bot: |
95 |
|
96 |
``` |
97 |
npm start |
98 |
``` |
99 |
|
100 |
And if everything was configured correctly, you should not see an error and the bot should say `Logged in as [tag]!`. |
101 |
Then you can run the following command in Discord to make sure everything is working: |
102 |
|
103 |
``` |
104 |
-about |
105 |
``` |
106 |
|
107 |
That should show the bot information. |
108 |
Congratulations! You've successfully set up your own instance of SudoBot! |
109 |
|
110 |
### Support |
111 |
|
112 |
- **Email**: [email protected] |
113 |
- **Discord Servers**: [The Everything Server](https://discord.gg/Km7ZcfXT6P), [Support Server](https://discord.gg/892GWhTzgs) |