Skip to content

onesoft-sudo/sudobot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SudoBot

Build GitHub GitHub package.json version GitHub commit activity Discord

A Discord bot for moderation purposes. Click here to see the screenshots.

Features

  • 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

Getting started

You can request an invite for SudoBot here. Alternatively, you can create your own Discord API application and then host SudoBot.

Setup for Custom Hosting

Requirements

Optional Services

  • Cat and dog API Token (for fetching cat and dog images using cat and dog 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 an API secret, you can run openssl rand -base64 10 to generate a random base64 string and use it as secret)

Setup steps

  1. Download the latest release or clone the repo by running:
git clone https://github.com/onesoft-sudo/sudobot
  1. Go inside the project directory, and run the following command:
npm install -D
  1. 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.

Alternatively, you can try the new setup.js installer script [BETA] by running node setup.js. It will ask you some questions about the configuration.

  1. Copy the .env.example file to .env and open it, edit the information (such as bot token. MongoDB URI, etc) as needed.

  2. Build the project:

npm run build
  1. Deploy slash commands globally:
node deploy-commands.js
  1. 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!

Contributors

Thanks to all the contributors!

Support

Extra