Libereus is a self-hosted only Discord moderation bot written in Python 3.6 that aims to make server moderators' lives easier. Initially created as a submission to participate in Discord Hack Week 2019 and received second place. Our original submission can be found here.
It has the ability to:
✅ Prune inactive members via their last message's date
✅ Disable or re-enable messaging permissions on a given channel for normal members (channel lockdown)
✅ Detects bad word and give strike to the sender
✅ Remove a prefix from members' nicknames (i.e. usage of!
to hoist to the top of the member list)
✅ 💣 GENERATE A COOL SPOILER-MINESWEEPER GAME 💣
...and much more!
🐍 Python 3.4 or above (Python 3.6 recommended)
- Navigate to Discord Developer Portal (Applications).
- Click on "New Application".
- Fill in a name for your bot (or just "Libereus"), and click on Create.
- Click on "Bot" at the left navigation panel, and then "Add Bot".
- Next, click on "Click to Reveal Token" in the "Build-A-Bot" section and write down the token somewhere, it is required for the installation later. (DO NOT SHARE YOUR TOKEN WITH ANY OTHER PEOPLE, NOT EVEN ANIMALS!)
- Now click on "OAuth2" on the left navigation panel, scroll down to "Scopes" and then tick on "bot".
- Scroll further down to find "Bot Permissions" and check on "Administrator".
- You can now proceed to copy the generated link in the "Scopes" section and open the link in your web browser.
- Add the bot into your server through the page.
- Make sure you have Python 3 installed (We recommend python 3.6). (Download it via python.org)
- Download and extract or clone this repository into your computer.
- Create a copy of "settings.example.json" and rename it into "settings.json"
- Open the file through your favourite text editor (Notepad may work too).
- These are the settings for you to tweak. Scroll to the bottom and replace "your bot token here" with the bot token you just obtained from the previous step.
- Save it. (Ctrl+S for most cases)
- Now open up the Command Prompt by pressing Win+R, type in
cmd
, and then press the "OK" button. - In the black Command Prompt window, type in the following command. (Make sure you use
cd <your bot folder directory>
to navigate to your folder beforehand).
pip3 install -r requirements.txt
- To run the bot, double click "bot.py" or do the following command in the bot's directory.
py -3 bot.py
Unfortunately, this bot requires Python 3 but Mac OS X / macOS ships with Python 2.7 out of the box, thus you need to install Python 3 seperately to run this bot.
- Open the "Terminal" application.
- Install Homebrew via the following command.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install Python 3 by entering the command.
brew install python3
- Clone this repository's master branch.
git clone https://github.com/Tansc161/Libereus.git --branch master
- Make a copy of settings.json from the example given.
cp settings.example.json settings.json
- Use your favourite text editor to edit settings.json or use nano in the Terminal.
nano settings.json
- Replace "your bot token here" with the bot token that you obtained from Step 5 in "Registering an access token for your bot" above. (Please note that you need to enclose your bot token with "quotation marks".)
- Save the file. (For nano users, press Ctrl+X, and then hit Y, and then hit Enter.)
- Now run this command to install the Python libraries required for the bot.
pip3 install -r requirements.txt
- Run the bot with the following command.
python3 bot.py
Follow the installation steps for "Mac" above, starting from Step 4.
Run /help
in Discord to see a list of available commands.
All command usage information are in standard function signature syntax, which states <>
as a required argument and []
as an optional argument.
rixinsc Tansc#8171
[Lead Dev & Founder]
Proladon Proladon#7525
[Dev]
NRockhouse NRockhouse#4157
[Dev & QA]
RedBerrie RedBerrie#3324
[QA]
If your server has hundreds or thousands of members, it may take a very long time to search.