A simple bot that helps to manage ban appeals on a Xenforo forum.
This is a specific use case, which utilises Vyhub API to check if a player is banned on a specific server and Xenforo API to pass the ban appeal to a specific appeal post.
Originally made by Vin, and now maintained by Votton
- Create a .env file
- Add the following environment variables to the file:
DB_HOST=""
DB_USER=""
DB_PASSWORD=""
DB_NAME=""
VYHUB_API_URL=""
VYHUB_API_KEY=""
XF_URL=""
XF_API_KEY=""
FORUM_NODE_ID=
FORUM_PREFIX=
VYHUB_API_KEY should be a dedicated VyHub API token, not a personal account bearer token (those carry far too much access and expire). Create one scoped to only the
ban_showproperty so it can read bans across the network and nothing else. Via the API:curl -X POST "$VYHUB_API_URL/general/api-token" \ -H "Authorization: Bearer <admin-bearer-token>" \ -H "Content-Type: application/json" \ -d '{"name":"Appeal Bot","properties":["ban_show"]}'Use the returned
access_tokenasVYHUB_API_KEY. Leaving outserverbundle_idgrantsban_shownetwork-wide, and the token does not expire.
- Run
npm install - Run
npm run build - Run
npm run start
This is a fork of my original project that was using GExtension instead, which can be found here.