Skip to content
CFTools Discord Bot
Server Configuration

🛠️ Server Configuration

All server configuration is done in config/servers.js and multiple servers are supported. This file contains all configuration variables/options that apply on a (DayZ) server-specific level. For example, you can have a DayZ server with a live-chat module, while your second server has this entirely disabled. Configuration is shared between Discord guilds/servers.

Creating the file

  1. Navigate into the /config folder
  2. Copy & Paste servers.example.js and rename the file to servers.js
  3. Fill in your server configuration values
It is important that you leave the .example file intact. This is used to point out the differences in configuration when you update to later versions. Aside form that, renaming the .example file directly will also create merge issues when updating to later versions

Server configuration options explained

This section will explain what the different configuration options mean. The configuration options can be categorized into separate modules:

Global (required)

Configuration that is required for most of our functionality to work, these should be considered required, meaning you will have to change these values to your own. Everything else can be considered optional and therefor left on the default values

Configuration OptionDescriptionType
NAMEThe name used to identify this server, used internally and when selecting servers in Discordstring
CFTOOLS_SERVER_API_IDYour CFTools Server API-ID, refer to the guidestring
SERVER_IPV4Your DayZ game-server's public IP address, your users use this to connect to your serverstring
SERVER_PORTYour DayZ game-server port, not your steam-query portnumber

Webhook Configuration

Configure a CFTools webhook for your server, this is used for (including, but not limited to) the live-chat module and delayed kill-feed.

This configuration instructs the bot to extract information from the CFTools webhook messages (game events, like player.kill and user.join) to be used across multiple different modules. This approach was chosen to avoid having to setup an HTTPS-enabled web-server.

Check out our guide if you need help setting up your CFTools webhook - it's made for a different project, but the process is the same. (step 7 is not relevant for this project)

Configuration OptionDescriptionType
CFTOOLS_WEBHOOK_CHANNEL_IDThe id of the channel where CFTools webhook messages are sendstring
CFTOOLS_WEBHOOK_USER_IDThe id of the user/webhook that sends the CFTools webhook messagesstring

Command Configuration

These configuration options apply changes to commands/functionality that aren't considered modules

Configuration OptionDescriptionType
STATISTICS_INCLUDE_ZONES_HEATMAPInclude the zones heatmap image in the /statistics commandboolean
STATISTICS_KEEP_PUPPETEER_BROWSER_OPENKeep the Chromium browser open - this generates the heatmap faster, but uses ~20 MB more RAMboolean
STATISTICS_HIDE_PLAYER_NAME_HISTORYSet this to false if you want a player's in-game name history to be publicboolean
SERVER_INFO_INCLUDE_MOD_LISTInclude mod list output/embeds in /server-infoboolean

Live Chat Module

This application offers a module that let's you dynamically forward/relay chat from members in Discord, to your DayZ server - use these configuration options to modify/personalize the module

Requires the privileged "Message Content Intent" ( (opens in a new tab) > Your App > Bot > Message Content Intent - check out this guide if you need more information)
Max message length is 256 characters, and a members tags and display name count towards that
If live-chat messages in game display as BattlEye errors, you'll most likely have to disable advancedChatInterface in your Gamelabs mod configuration, this is due to mod conflicts
Configuration OptionDescriptionType
USE_CHAT_FEEDEnable or disable the chat feed moduleboolean
CHAT_FEED_CHANNEL_IDSThe channels where members can send messages that get forwarded to DayZstring[]
CHAT_FEED_REQUIRED_ROLE_IDSRequired roles for a message to be broadcasted to DayZ. Public if empty. All roles defined are requiredstring[]
CHAT_FEED_USE_DISCORD_PREFIXEnable or disable the "(Discord)" prefix in the in-game messageboolean
CHAT_FEED_USE_DISPLAY_NAMEBy default displayed the members nickname, can be disabled to display username insteadboolean
CHAT_FEED_MESSAGE_COOLDOWNMembers messages get forwarded to DayZ once every X seconds. Set to false to disable throttlingnumber or false
CHAT_FEED_MAX_DISPLAY_NAME_LENGTHMaximum allowed length of Discord display namesnumber
CHAT_FEED_DISCORD_TAGSList of Discord role tags to display in-game. If member has multiple roles the first role tag will be usedarray
CHAT_FEED_DISCORD_TAGS#roleIdsRoles a member should have for this to check truestring or string[]
CHAT_FEED_DISCORD_TAGS#displayTagThe tag displayed in-game when truestring

Teleport Configuration

Configure the use of premade teleport locations

Configuration OptionDescriptionType
USE_TELEPORT_LOCATIONSShould the /teleport-location command be availableboolean
TELEPORT_LOCATIONS_FILE_NAMETeleport file to use for this server configuration. Loaded from /config/teleport-locations/string

Watch List configuration

Configure the use of custom role-ping notifications when players that are in a custom managed list log in to any of your servers

Requires the Message Content intent
Requires the CFTools webhoook with user.join event
Configuration OptionDescriptionType
WATCH_LIST_CHANNEL_IDThe id of the channel where notifications should be sendstring
WATCH_LIST_NOTIFICATION_ROLE_IDThe id of the role that should be pinged in notificationsstring

Delayed Kill Feed configuration

Configure a custom delayed killfeed, forwarding webhook messages to a different/public channel after a specified delay

Requires the Message Content intent - information is read from CFTools webhoook with player.kill event
Configuration OptionDescriptionType
USE_KILL_FEEDShould the module be enabled for this server configurationstring
KILL_FEED_DELAYHow long to wait (in seconds) before forwarding the killfeed messagestring
KILL_FEED_CHANNEL_IDThe id of the channel where killfeed messages should be forwarded/send tostring
KILL_FEED_MESSAGE_IDENTIFIERThe string that indicates if something should be included in the kill-feed relay, more infostring
KILL_FEED_REMOVE_IDENTIFIERShould the identifier be removed from the message before forwarding/relayingboolean

Kill Feed Message Identifier

The kill feed message identifier is a string that is used to determine if a message should be included in the kill feed relay. This is used to prevent messages that are not kill-feed messages from being relayed, and to include other CFTools webhook events as desired by your community.

The default value is got killed by, which only matches the default CFTools message for the player.kill event.

If you want to include other events, you can (for example):

Update your configuration (servers.js)
  2. Change KILL_FEED_REMOVE_IDENTIFIER to true, this will remove KILL_FEED_INCLUDE | from the message before relaying it
Update your CFTools webhook templates
  1. Navigate to your CFTools Dashboard (opens in a new tab)
  2. Navigate to your server > Manage > Integrations
  3. Find the webhook that is being used for the kill-feed relay
  4. Click Templates and copy-paste the KILL_FEED_MESSAGE_IDENTIFIER value at the start of every event you want to include as displayed below


This feature was funded for public use by RAGEx from Full Throttle DayZ (opens in a new tab) - thank you for your support and contribution to the community!

Leaderboard Configuration

Global /leaderboard command configuration. Configure sorting stats, output format and your leaderboard blacklist,

Configuration OptionDescriptionType
OVERALL_RANKING_STATWhat stat should be used to determine player rank when using OVERALL statisticsone of LEADERBOARD_STATS
LEADERBOARD_DEFAULT_SORTING_STATWhat stat should be used as the default sorting statone of LEADERBOARD_STATS
LEADERBOARD_PLAYER_LIMITHow many players to display - min 10, max 100number
LEADERBOARD_BLACKLISTPlayers (steam64/CFToolsID) to exclude from leaderboardstring[]
LEADERBOARD_STATSWhat stats should be enabled in the leaderboard modulestring[]

Automatic Leaderboard

A module that sets a channel as a dedicated, always up-to-date leaderboard feed

Configuration OptionDescriptionType
AUTO_LB_ENABLEDShould we automatically update/post the leaderboardboolean
AUTO_LB_CHANNEL_IDThe id of the channel to post the leaderboardstring
AUTO_LB_INTERVAL_IN_MINUTESTime between messages in minutesnumber
AUTO_LB_REMOVE_OLD_MESSAGESShould we delete our old messagesboolean
AUTO_LB_PLAYER_LIMITAmount of players to display on automatic leaderboard, min 10, max 100number
AUTO_LB_STATThe stat to rank players by in auto leaderboard moduleone of LEADERBOARD_STATS

Multiple servers

To add a second, or more, servers - copy-paste your entire server block and modify the configuration. Afterwards, make sure your syntax is still valid:

  }, <-- Notice the comma - always add this when adding a new server block