A Discord bot for moderation purposes.
- Strong automoderation system with tools like anti-spam and anti-raid (Click here to see the full list)
- Useful moderation tools and utilities
- Secure
- Fun commands
- Active development & support
You can request an invite for SudoBot here. Alternatively, you can create your own Discord API application and then host SudoBot.
- NodeJS version 16 or higher
- MongoDB version 5.0 or higher
- A Discord API application token with proper setup
- Cat and dog API Token (for fetching cat and dog images using
cat
anddog
commands, the tokens can be obtained at thecatapi.com and thedogapi.com) - Pixabay API Token (can be obtained here)
- A Discord Webhook URL for sending error reports
- 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)
First, download the latest release or clone the repo by running:
git clone https://github.com/onesoft-sudo/sudobot
Then go inside the project directory, and run the following command:
npm install -D
Then open up the config/config.json
file and change at least the following:
{
"global": {
"id": "set your home guild id",
"owners": ["set owner user ids here"],
...
},
"guild id here": {
"prefix": "-",
"mod_role": "the mod role, users having it will be able to use the bot",
"gen_role": "general role id, which all users have",
"mute_role": "the muted role id",
"admin": "the admin role id. users having it will be immune to sudobot.",
...
}
}
Note: ...
means other options that exist in the config, you can edit them to customize the settings, but not required.
Then copy the .env.example
file to .env
and open it, edit the information (such as bot token. MongoDB URI, etc) as needed.
Build the project:
npm run build
Deploy slash commands globally:
node deploy-commands.js
Start the bot:
npm start
And if everything was configured correctly, you should not see an error and the bot should say Logged in as [tag]!
.
Then you can run the following command in Discord to make sure everything is working:
-about
That should show the bot information. Congratulations! You've successfully set up your own instance of SudoBot!
- Email: rakinar2@onesoftnet.eu.org
- Discord Servers: The Everything Server, Support Server