Overview • Prerequisites • Installation • Migration • Ingame Commands • To Do • Author • Contributing • License
A Discord bot that utilizes RCON for the Mordhau server and logs punishments with extra features. It makes use of Slash Commands and has in-game commands. As this is version 2 of AssaultLine's Mordhau Ban Logger a migration feature has been added. The bot is semi-configurable, some features can be toggled on, off, or customized (like killstreaks). The bot is self-hosted so you need to host the bot on your server.
- Per-server punishments saving (You can customize each server to save specific punishment types or just disable it altogether)
- Sync server punishments (Default: false)
- Per-server in-game commands specification (You can choose which commands are available in-game)
- Per discord role slash commands access (You can choose which commands are available for each role, multiple roles can have the same permissions)
- Global punishments (Servers can be set to ignore global punishments)
- Killstreaks (You can toggle this feature, as well as a toggle to count bot kills for each server and customize it, for each kill threshold with its message. The available variables are
{name}
and{kills}
) - Automod (Fully customizable, you can also change the profane words list by configuring
bannedWords.json
. The available variables are{name}
and{words}
) - Admin list saving/rollback (Toggleable feature with notifying only mode)
- Auto Update (The bot will automatically download and overwrite files as well as auto restart the bot, it's a good idea to check out the patch notes and change
config.json
to match the structure ofexample.config.json
(not a requirement as the bot has own config system that has values to fall back to)) - Warn system (Acts like automod infraction threshold system with a reset after duration (in minutes, default is 1 month). The available variables are
{name}
,{currentWarns}
and{maxWarns}
) - Teleport system (Dynamically add/remove/edit teleport locations, default: no locations provided)
- Server status (You do not have to enable
bAdvertiseServerViaSteam
to show server stats, if you use DiscordGSM you have to enable it) - Map vote (Works like RTV, Rock The Vote. Enabling the feature will enable the
votemap [map number]
(map number is ignored until the map list message pops up) andcancelmapvote
(for admins) commands) - Admin list command (the ability to see all the admins with when they last played and total playtime past any amount of days, default: 14 days)
You can only have a maximum of 25 servers (not that you will have that many) as this is a limitation of Discord's Slash Commands.
Invite your bot using the link (replace "<bot ID>" with your bot ID): https://discord.com/api/oauth2/authorize?client_id=<bot ID>&permissions=536947728&scope=bot%20applications.commands
The auto-updater will download, install all dependencies, build and migrate configs automatically when there's an update available, the only thing you should do is make sure the settings in the config
files fit your preferences.
To see your coordinates then use ShowDebug PHYSICS
and look at the left side where it says location and to disable the view use ShowDebug
For setting discord role commands access
admins
teleportadd
teleportremove
teleportedit
ban
banned
chatlog
deletehistory
deletepunishment
globalban
globalmute
globalunban
globalunmute
history
kick
mute
rename
kill
say
unban
unmute
warn
unwarn
addadmin
removeadmin
globaladdadmin
globalremoveadmin
rcon
update
Which commands are available in-game
timeleft
killstreak
requestadmin
topkillstreak
ban
kick
mute
unban
unmute
warn
unwarn
kill
- Node.js (preferably the latest LTS version).
- You need to create a MongoDB cluster, you can get one free on MongoDB Atlas, follow the official guide from part 1 to part 4.
- Steam API Key.
- Setup RCON on the Mordhau server.
- Clone the repository
- Copy
example.config.json
file asconfig.json
and edit the settings - Install the required dependencies:
npm install
oryarn install
- Build the bot:
npm run build
oryarn build
- Start the bot:
npm run start
oryarn start
5.1 (Recommended step) Start the bot with PM2 instead:pm2 start pm2.json
(PM2 is the only supported process manager for Auto Update restart, others have not been tested, but if it fails it will just send a console log message every 5 minutes notifying the bot has been updated but needs a manual restart)
To migrate from the Mordhau Ban Logger copy-paste the save folder to dist/migration
(maybe change the files' name to the new desired server name, note: all underscores ("_") becomes spaces (" ")) and run npm run migrate
or yarn migrate
<>
- Required
[]
- Optional
Command | Description | Usage | Example |
---|---|---|---|
Killstreak | Get a player's killstreak | killstreak [player name] | killstreak Schweppes |
HighestKillstreak | Get the current match top killstreak | highestkillstreak | highestkillstreak |
RequestAdmin | Request for a admin | requestadmin [message] | requestadmin FFA! |
Command | Description | Usage | Example |
---|---|---|---|
Ban | Ban a player | ban <player name/id> [--duration/-d number] [--reason/-r string] | ban Schweppes --duration 100 --reason FFA |
Kick | Kick a player | kick <player name/id> [--reason/-r string] | kick Schweppes --reason FFA |
Mute | Mute a player | mute <player name/id> [--duration/-d number] | mute Schweppes --duration 100 |
Unban | Unban a player | unban | unban Schweppes |
Unmute | Unmute a player | unmute <player name/id> | unmute Schweppes |
Warn | Warn a player | warn <player name/id> | warn Schweppes |
- Fix global punishment commands to use one embed and one database documents
- Global addadmin/removeadmin commands
- Clear system for players and admins
- Add confirmation system, like reactions for global and clear system
- Make admin list saving/rollback toggleable as well as only notify mode
- Make automod customizable
- Make punishments_id allow multiple ids for punishments deletion
- Each server has its log channels with id instead of webhook URL
Tom Beijner
- GitHub: @Tom-Beijner
- LinkedIn: @Tom-Beijner
Contributions, issues, and feature requests are welcome! Feel free to check issues page.
Please ⭐️ this repository if this project helped you!
Copyright © 2021 Tom Beijner AKA Schweppes. This project is MIT licensed.