A DayZ bot written in Javascript to display your leaderboard using the CFTools Cloud API.
This project has been archived and has since been replaced with cftools-discord-bot, a bot that that fully utilizes the CFTools Data API and offers way more than just a leaderboard
Come try the bot yourself in our official support server!
cmd.exe
in the File Explorer pathnpm install
.env.example
file in the same directory and re-name the created file to .env
.env
file and fill in your values
CLIENT_ID
: Can be grabbed by creating a new application in your Discord Developer PortalDISCORD_BOT_TOKEN
: After creating your bot on the link above, navigate to Bot
in the left-side menu to reveal your bot-tokenCFTOOLS_API_APPLICATION_ID
: Application ID from your CFTools Developer Apps - Authorization has to be granted by navigating to the Grant URL
that's displayed in your app overviewCFTOOLS_API_SECRET
: Same as above, click Reveal Secret
config/servers.example.json
file and rename it to servers.json
. Fill in your values.
CFTOOLS_SERVER_API_ID
: Click Manage Server
in your CF Cloud Panel > Settings
> API Key
> Server ID
node .
in the project root folder/directory or npm run start
if you have PM2 installed to keep the process alive.Server configuration is managed through the /config/servers.json
file, here is a quick reference of what the values mean.
This is NOT valid JSON, as you should NOT use this file, use the example instead
[
{
// The name to display when selecting servers with /leaderboard and /stats
"name": "Name to display - server WITH automatic leaderboard",
// Click `Manage Server` in your CFTools dashboard (https://app.cftools.cloud/dashboard) > `Settings` > `API Key` > `Server ID`
"CFTOOLS_SERVER_API_ID": "Your secret server API id",
// Should the automatic leaderboard be enabled
"AUTO_LB_ENABLED": true,
// ID of the channel to post the automatic leaderboard to
"AUTO_LB_CHANNEL_ID": "806479539110674472",
// How often should the leaderboard be updated
"AUTO_LB_INTERVAL_IN_MINUTES": 60,
// Should old leaderboard data/messages be deleted
"AUTO_LB_REMOVE_OLD_MESSAGES": true,
// The amount of players to show on the leaderboard
"AUTO_LB_PLAYER_LIMIT": 25
}
]
Check out this video by The Coding Train
Yes. Your DayZ server has to be connected to the CFTools Cloud API and needs the GameLabs integration mod.