Version 2.0.7
Changes in 2.0.0
- (+) Updated to Discord.js v12.
- (+) Warning points.
- (+) Prune messages.
- (+) Listing warnings now has pages.
- (+) Extra logging - Message & user updates.
- (+) Multiple Discord server support.
- (+) Mute and temp ban timer - Also supports leave/join bypass.
- (-) Commands & events no longer in one file.
- (-) User tags (eg: Zachary#0001) support.
- (-) Warning ID's
Commands
All commands start with the prefix & can only be used by admins that are both set in the config | () = Required, [] = Optional
warn (@user) (points) [reason]
Adds warning points to the user. User must be mentioned (Still possible to mention with ID if user is not in the guild/server). If no reason is provided, it will set the reason to "No reason provided".
remove (@user) [number]
| remove last
User: Removes a warning from the user. If no number is specified, it will remove the users last warning, otherwise it will remove the warning from the position in their warning list. If you wish to remove a certain amount of points, I suggest warning them with negative points. Last: Removes the last warning given to any user within the guild/server.
list (@user) [page number]
Gets a list of warnings issued to the mentioned user. A maximum of 5 warnings will display on a page. If there are more than 5 warnings, use the page number to navigate through other pages (defaults to first page if none is specified).
prune (number)
Bulk deletes the number of messages in the channel used in. Discord only allows up to 100 bulk deleting messages. Be careful repeating this command in a short period of time.
ping
More moderation commands may be added in the future.
Thanks to!
All contribuitors who help improve this repo for others!
And all of my sponsors
Setup
Note 1: For the bot to make use of all permisions, 2FA is required on the bot owners account.
Note 2: Check out this to setup your own bot and get a token for it...
Note 3: Here is a link on how to find IDs in Discord
- Navigate to the directory in terminal
- Ensure Node.js 12.0.0 or newer is installed by using
node -v
- Install required packages by using
npm i
- Rename
template.config.js
toconfig.js
, then open and follow steps inside. - Copy a DB type that you wish to use from the
/databases
folder and paste it in the/src
folder with the namedb.js
- To start bot, run
npm start
- Done! :)
Updating from v1.0.0
Included is a script to convert the Warnable v1.0.0 JSON database for Warnable v2.0.0. (( Make sure to complete the setup first and run the bot once! ))
The update script will use the database you configured in the setup.
Steps to run the updater:
- Open /src/update.js and edit the setting values for your configuration.
- Run
npm run update [v1 db path]
in terminal. - Read and follow instructions.
- Done!