/[sudobot]/trunk/README.md
ViewVC logotype

Contents of /trunk/README.md

Parent Directory Parent Directory | Revision Log Revision Log


Revision 432 - (show annotations)
Mon Jul 29 17:30:13 2024 UTC (8 months, 1 week ago) by rakin
File MIME type: text/markdown
File size: 3636 byte(s)
docs: update readme
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
23 - Useful moderation tools
24 - Secure
25 - Fun commands
26
27 ### Getting started
28
29 You can request an invite for SudoBot [here](https://sudobot.everything-server.ml/).
30 Alternatively, you can create your own Discord API application and then host SudoBot.
31
32 ### 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:
46
47 ```
48 git clone https://github.com/onesoft-sudo/sudobot
49 ```
50
51 Then go inside the project directory, and run the following command:
52
53 ```
54 npm install -D
55 ```
56
57 Then open up the `config/config.json` file and change at least the following:
58
59 ```json
60 {
61 "global": {
62 "id": "set your home guild id",
63 "owners": ["set owner user ids here"],
64 ...
65 },
66 "guild id here": {
67 "prefix": "-",
68 "mod_role": "the mod role, users having it will be able to use the bot",
69 "gen_role": "general role id, which all users have",
70 "mute_role": "the muted role id",
71 "admin": "the admin role id. users having it will be immune to sudobot.",
72 ...
73 }
74 }
75 ```
76
77 **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:
82
83 ```
84 npm run build
85 ```
86
87 Deploy slash commands globally:
88
89 ```
90 node deploy-commands.js
91 ```
92
93 Start the bot:
94
95 ```
96 npm start
97 ```
98
99 And if everything was configured correctly, you should not see an error and the bot should say `Logged in as [tag]!`.
100 Then you can run the following command in Discord to make sure everything is working:
101
102 ```
103 -about
104 ```
105
106 That should show the bot information.
107 Congratulations! You've successfully set up your own instance of SudoBot!
108
109 ### Support
110
111 - **Email**: [email protected]
112 - **Discord Servers**: [The Everything Server](https://discord.gg/Km7ZcfXT6P), [Support Server](https://discord.gg/892GWhTzgs)

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26