DayZ Leaderboard Bot
A DayZ bot written in Javascript to display your leaderboard using the CFTools Cloud API.
Demo
Come try the bot yourself in our official support server!
Step-by-step Video Guide
The people at Custom DayZ Services were kind enough to provide us with a step-by-step video guide/tutorial on how to set up the bot and get it online & responsive. The video is located in our support server on Discord.
Click me after joining to jump to guide!
Technologies Used
Prerequisites
- Node.js
- Head over to the download page
- Download the latest LTS available for your OS
- Be sure to check the box that says “Automatically install the necessary tools” when you’re running the installation wizard
- A Discord Bot account
- Head over to the page linked above
- Click “New Application” in the top right
- Give it a cool name and click “Create”
- Click “Bot” in the left hand panel
- Click “Add Bot” -> “Yes, do it!”
- Click “Rest Token” and copy it to your clipboard, you will need it later
Installation
- Download the latest release here
- Extract/unzip the downloaded compressed file into a new folder
- Open a command prompt in the project root folder/directory
- On Windows you can type
cmd.exe
in the File Explorer path - Root folder structure:
- commands/
- local_modules/
- .env.example
- index.js
- etc…
- On Windows you can type
- Run the command
npm install
- Copy-paste the
.env.example
file in the same directory and re-name the created file to.env
- Open the
.env
file and fill in your valuesCLIENT_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 toBot
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 theGrant URL
that’s displayed in your app overviewCFTOOLS_API_SECRET
: Same as above, clickReveal Secret
CFTOOLS_SERVER_API_ID
: ClickManage Server
in your CF Cloud Panel
- Add the bot to your server by using the following link: (Replace CLIENT-ID with your CLIENT_ID from before) https://discord.com/api/oauth2/authorize?client_id=CLIENT-ID&permissions=0&scope=bot%20applications.commands
- Run the command
node .
in the project root folder/directory ornpm run start
if you have PM2 installed to keep the process alive.
FAQ
How do I create the Discord bot account?
Check out this video by The Coding Train
Is any specific set-up required to use this?
Yes. Your DayZ server has to be connected to the CFTools Cloud API and needs the GameLabs integration mod.