ps2PlayerManager is a discord bot used to aid in the administration of planetside 2 outfits who use discord to manage their players.
Created for for No Fear (connery NC) by silverlily but useable by anyone.
Features:
automaticly detects when a discord users nickname doesn't match with a ingame name in the outfit and applies a role as specified in the config. (ING Doesn't Match for example)
automaticly detects when a discord users roles dont match with their ps2 rank and applies a role as specified in the config. (rank update for example)
original repo: https://github.com/silvenlily/ps2PlayerManager
getting started: (ubuntu terminal)
git & npm are required to install using this guide.
- clone the repo using "
sudo git clone https://github.com/silvenlily/ps2PlayerManager
" - move into the directory this created
- install the depencenies using "
sudo npm install
" - run the bot using "
node .\ps2-player-manager.js
" the first time you do this the bot will generate config & tokens files for you. - place your tokens into the tokens file & populate the config file.
- if not using pm2 run the bot using "
node .\ps2-player-manager.js
" if using pm2 (recommended) start the bot using "pm2 start ps2-player-manager.js --watch
"
recommended:
Use a proccess manager like pm2 to manage the bot and automatically restart if it crashes.
exempting members:
You can use ]exempt <@username> to exempt a player from being checked. All users with the [bot] tag are automaticly excempt.
config file
all values not marked as optional are required.
configVersion: do. not. change. this.
psGuild: planetside guild id
world: (default: 1 (connery)) planetside numeric server id
dGuild: discord guild id
commandChar: prefix for commands
member: (default: "]") the role id required to automaticly try and match a discord user to a ps2 player
exempt: discord users with this role will be ignored, regardless of if they have the member role
unmached: role id to give to players if they have the member, and their discord nick does not match a ps2 player on the given server and guild.
matchRanks: (default: false) true/false should the bot give players the update role if their ps2 role & discord role do not match. If false then update & ranks are unused.
update: role id used if matchRanks is true
ranks: ps2 rank names & discord role id pairs, , first letter must be capitalized and all other letters must be lowercase
format is {"rank name":"role id", "rank name":"role id", "rank name":"role id"}
for example: {"Ensign":"1234556789", "Liutenent":"1234556789","Captian":"1234556789"}
use jsonlint.com to validate your ranks as json can be quite fiddley.
License (modified ISC)
Copyright 2020 lily-s
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that both:
- The above copyright notice and this permission notice appear in all copies.
- The entire contents of this file (README.md) appear unmodified in all copies OR if the software has been modified the unmodified contents of this file appears in the modified softwares readme and/or licence files.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.