Takaro module library

Takaro Modules

Takaro is a game server management platform for running, automating, and moderating multiplayer communities. These modules install into Takaro to add server automation, Discord workflows, economy systems, and moderation tools.

dayzDiscordIntegration

by Mad
for DayZ
Connect a DayZ server to Discord with chat relay, player join and leave alerts, server status updates, death notifications, and new-player announcements. This community module is a practical DayZ server management example for admins who want game activity visible in Discord without manually copying updates.
Use this module to:
  • Relay DayZ global chat into Discord and Discord messages back into the game.
  • Post player connection, disconnection, death, and server status events.
  • Announce new players in a configurable Discord channel.
communityTakaro 0.7.2

Components Overview

1
config
0
commands
6
hooks
1
Cron Jobs
1
functions
0
permissions

New Module: dayzDiscordIntegration

NEW
May 6, 2026
Updated to version latest. Added 6 hooks: Online - Offline (server-status-changed), PlayerDied (log), DiscordToGame (discord-message), PlayerDisconnected (player-disconnected), GameToDiscord (chat-message), PlayerConnected (player-connected). Added 1 scheduled task: serverStatus. Added 1 function: utils. New configuration options: sendPlayerConnected, sendPlayerDisconnected, onlyGlobalChat, discordChannelIdCustom, newPlayerDiscordChannel, newPlayerDiscordMessage.

Configuration

Configure this module using the schemas below. The JSON schema defines the data structure, while the UI schema customizes how the configuration form is displayed.

Configuration Schema

Configuration Properties (6)

sendPlayerConnectedboolean
sendPlayerConnected

Send a message when a player connects.

Default: true
sendPlayerDisconnectedboolean
sendPlayerDisconnected

Send a message when a player disconnects.

Default: true
onlyGlobalChatboolean
onlyGlobalChat

Only relay messages from global chat. (no team chat or private messages)

Default: true
discordChannelIdCustom*string
discordChannelIdCustom

Custom Discord Channel Id

newPlayerDiscordChannelstring
newPlayerDiscordChannel

Discord channel ID for new player announcements (leave empty to disable)

Default:
newPlayerDiscordMessagestring
newPlayerDiscordMessage

New player Discord message. Use {player} and {server} as placeholders.

Default: 🎆 **{player}** is a new player. Welcome to **{server}**!
Constraints: minLength: 1, maxLength: 200

UI Schema

No UI schema defined. Configuration form will use default rendering.

About Configuration Schemas

The Configuration Schema defines the structure and validation rules for module settings. The UI Schema customizes how the configuration form is displayed in the Takaro interface, including field ordering, labels, and input types.

Hooks (6)

These hooks respond to various game events automatically. Each hook executes JavaScript code when its specific event type occurs, allowing modules to react to player actions, system changes, and more.

Real-time Events

4 hooks

DiscordToGame

discord-messageEvent Type
Function Implementation

DiscordToGame Hook Function

JAVASCRIPT
Event Details
Event Type:discord-message
Trigger:Automatic
Category:Real-time Events

PlayerDisconnected

player-disconnectedEvent Type
Function Implementation

PlayerDisconnected Hook Function

JAVASCRIPT
Event Details
Event Type:player-disconnected
Trigger:Automatic
Category:Real-time Events

GameToDiscord

chat-messageEvent Type
Function Implementation

GameToDiscord Hook Function

JAVASCRIPT
Event Details
Event Type:chat-message
Trigger:Automatic
Category:Real-time Events

PlayerConnected

player-connectedEvent Type
Function Implementation

PlayerConnected Hook Function

JAVASCRIPT
Event Details
Event Type:player-connected
Trigger:Automatic
Category:Real-time Events

System Events

2 hooks

Online - Offline

server-status-changedEvent Type
Description
No
Function Implementation

Online - Offline Hook Function

JAVASCRIPT
Event Details
Event Type:server-status-changed
Trigger:Automatic
Category:System Events

PlayerDied

logEvent Type
Description
No
Pattern Match
.*playerDied.*

This hook only triggers when the event data matches this regular expression pattern.

Function Implementation

PlayerDied Hook Function

JAVASCRIPT
Event Details
Event Type:log
Trigger:Pattern Match Required
Category:System Events

About Module Hooks

Hooks allow your module to respond automatically to game events like player actions, server status changes, and chat messages. Each hook has an event type that determines when it triggers, optional regex patterns for filtering specific events, and a JavaScript function that executes when the conditions are met. Hooks are grouped by category for better organization.

Scheduled Jobs (1)

These jobs run automatically on a schedule defined by cron expressions. Each job executes JavaScript code at specific times or intervals.

serverStatus

*/30 * * * *Schedule

Description

Why

Schedule Details

Cron Expression
*/30 * * * *
Human-Readable Schedule

Every 30 minutes

Function Implementation

serverStatus Function

JAVASCRIPT

Cron Expression Format

minute hour day-of-month month day-of-week

Each field can contain numbers, ranges (1-5), lists (1,3,5), or wildcards (*). Use */n for intervals (e.g., */5 for every 5 units).

About Scheduled Jobs

Cron jobs allow your module to execute code automatically on a schedule. Each job has a cron expression that defines when it runs, and a JavaScript function that executes at those times. Jobs run server-side and can perform maintenance tasks, send notifications, or update game state automatically.

Functions (1)

Reusable JavaScript functions that can be imported and used by other module components like commands, hooks, and cron jobs. These promote code reuse and modularity.

utils

functionReusable Component

Function Implementation

utils Function

JAVASCRIPT

Import Usage

Import: import { utils } from './utils';

About Module Functions

Functions are reusable JavaScript components that can be imported and used by commands, hooks, and cron jobs within your module. They promote code reuse, improve maintainability, and allow you to organize complex logic into modular pieces. Functions must be exported with proper ES6/CommonJS syntax to be importable by other components.