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
- 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.
Components Overview
New Module: dayzDiscordIntegration
NEWOnline - 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)
sendPlayerConnected
Send a message when a player connects.
truesendPlayerDisconnected
Send a message when a player disconnects.
trueonlyGlobalChat
Only relay messages from global chat. (no team chat or private messages)
truediscordChannelIdCustom
Custom Discord Channel Id
newPlayerDiscordChannel
Discord channel ID for new player announcements (leave empty to disable)
newPlayerDiscordMessage
New player Discord message. Use {player} and {server} as placeholders.
🎆 **{player}** is a new player. Welcome to **{server}**!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
PlayerDisconnected
Function Implementation
PlayerDisconnected Hook Function
JAVASCRIPTEvent Details
GameToDiscord
Function Implementation
GameToDiscord Hook Function
JAVASCRIPTEvent Details
PlayerConnected
Function Implementation
PlayerConnected Hook Function
JAVASCRIPTEvent Details
System Events
Online - Offline
Description
Function Implementation
Online - Offline Hook Function
JAVASCRIPTEvent Details
PlayerDied
Description
Pattern Match
.*playerDied.*This hook only triggers when the event data matches this regular expression pattern.
Function Implementation
PlayerDied Hook Function
JAVASCRIPTEvent Details
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
Description
Schedule Details
Cron Expression
Human-Readable Schedule
Every 30 minutes
Function Implementation
serverStatus Function
JAVASCRIPTCron Expression Format
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
Function Implementation
utils Function
JAVASCRIPTImport Usage
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.







































