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.
SVMPersistentStatusAndDiscordBridge
- Maintain a live persistent Discord server status message with player counts, in-game time, day counters, and active player lists.
- Relay chat both ways between in-game chat and Discord.
- Send Discord notifications for player joins, leaves, deaths, server status changes, and Blood Moon horde cycles.
- Add custom Discord emotes in front of player names and other Discord fields. To copy a custom emote ID, type a backslash before the emote in Discord, for example :custom_emote:, then send it to reveal the exact ID string.
Components Overview
Updated 2 Hooks
monitorDeathLog (log). Updated 1 hook implementation.New Module: SVMPersistentStatusAndDiscordBridge
NEWserverstats. Added 6 hooks: discordChatRelay (discord-message), gameChatRelay (chat-message), monitorLeave (player-disconnected), monitorJoin (player-connected), monitorServerStatus (server-status-changed), monitorDeath (player-death). Added 2 scheduled tasks: bloodMoonMonitor, updateStatus. Added 1 function: discord-7d2d-status-helpers. New configuration options: language, discordChannelId, chatRelayDiscordChannelId, bloodMoonDiscordChannelId, relayDiscordToGame, relayGameToDiscord, playerChatEmoji, monitorJoins, monitorLeaves, monitorDeaths, privateBloodMoonNoticeOnFirstJoin, timeConsoleCommand, firstHordeDay, hordeIntervalDays, bloodMoonStartHour, bloodMoonEndHour, bloodMoonIcon, statusTemplate, joinMessageTemplate, leaveMessageTemplate, deathMessageTemplate, deathWithReasonMessageTemplate, bloodMoonTodayMessage, privateBloodMoonTodayMessage, bloodMoonStartingMessage, bloodMoonEndingMessage, serverStartingMessageTemplate, serverOfflineMessageTemplate, emptyPlayerListText, unknownPlayerText, serverSenderName.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 (31)
Message language
Default language for system messages.
enDiscord channel ID for server status
Numeric Discord channel ID where the persistent server status is displayed.
Discord channel ID for chat relay
Numeric Discord channel ID used for two-way game chat relay.
Discord channel ID for Blood Moon and monitoring notices
Discord channel for joins, leaves, deaths, and Blood Moon notifications.
Relay Discord to game
Relay Discord chat messages into in-game chat.
trueRelay game to Discord
Relay in-game chat messages to the Discord chat channel.
trueDiscord player chat emoji
Emoji displayed before a player name when relaying game chat to Discord.
<a:soldierWALK:1530994865847013518>Monitor player joins
Send a notification when a player joins the server.
trueMonitor player leaves
Send a notification when a player leaves the server.
trueMonitor player deaths
Send a notification when a player dies.
truePrivate Blood Moon notice on first join
Privately notify the first joining player when Blood Moon is active or starts today.
falseGame console command for reading time
Console command that returns the current in-game day and time.
gettimeFirst horde day
First Blood Moon horde day.
7Horde interval in days
Number of days between Blood Moon hordes.
7Blood Moon start hour
In-game hour when Blood Moon starts.
22Blood Moon end hour
In-game hour when Blood Moon ends.
4Blood Moon status icon
Text or emoji appended to the status while Blood Moon is active.
⭒ 🩸Server status template
Status message template. Available placeholders: {onlinePlayers}, {day}, {time}, {bloodMoonIcon}, {playerList}, {serverName}.
{onlinePlayers} online ⭒ Day {day} ⭒ {time}{bloodMoonIcon}
Players:
{playerList}Player join template
Message sent to the monitoring channel when a player joins. Placeholder: {player}.
{player} joined the game.Player leave template
Message sent to the monitoring channel when a player leaves. Placeholder: {player}.
{player} left the game.Player death template
Death message without a reason. Placeholder: {player}.
{player} died.Player death with reason template
Death message with a reason. Placeholders: {player}, {reason}.
{player} died: {reason}Public Blood Moon day message
Announcement sent on horde day. Placeholder: {day}.
Day {day}. Blood Moon is expected today...Private Blood Moon day message
Private message sent to the first player on horde day. Placeholder: {day}.
Day {day}. Blood Moon is expected today...Blood Moon start message
Notification sent when the horde starts.
Blood Moon is rising...Blood Moon end message
Notification sent after the horde night ends.
Blood Moon is fading...Server start template
Server startup message. Placeholder: {serverName}.
Server starting...Server offline template
Message sent when the server goes offline. Placeholder: {serverName}.
Server offline.Empty player list text
Text shown when nobody is online.
No players onlineUnknown player text
Fallback player name.
PlayerServer message sender name
Label for system messages.
ServerUI 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.
Commands (1)
These commands can be executed by players in-game. Each command has a trigger word, optional arguments, and executes JavaScript code on the server.
About Module Commands
Commands allow players to interact with your module through chat. Each command has a trigger word that players type (prefixed with /), optional arguments for parameters, and a JavaScript function that executes when the command is used. Arguments are automatically validated and passed to the function.
Hooks (7)
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
discordChatRelay
Description
Function Implementation
discordChatRelay Hook Function
JAVASCRIPTEvent Details
gameChatRelay
Description
Function Implementation
gameChatRelay Hook Function
JAVASCRIPTEvent Details
monitorLeave
Description
Function Implementation
monitorLeave Hook Function
JAVASCRIPTEvent Details
monitorJoin
Description
Function Implementation
monitorJoin Hook Function
JAVASCRIPTEvent Details
System Events
monitorServerStatus
Description
Function Implementation
monitorServerStatus Hook Function
JAVASCRIPTEvent Details
monitorDeathLog
Description
Pattern Match
GMSG: Player '.+' died|\[(?:CSMM_Patrons|PrismaCore)\]playerDied:This hook only triggers when the event data matches this regular expression pattern.
Function Implementation
monitorDeathLog Hook Function
JAVASCRIPTEvent Details
Custom Events
monitorDeath
Description
Function Implementation
monitorDeath 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 (2)
These jobs run automatically on a schedule defined by cron expressions. Each job executes JavaScript code at specific times or intervals.
bloodMoonMonitor
Description
Schedule Details
Cron Expression
Human-Readable Schedule
Every minute
Function Implementation
bloodMoonMonitor 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).
updateStatus
Description
Schedule Details
Cron Expression
Human-Readable Schedule
Every minute
Function Implementation
updateStatus 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.
discord-7d2d-status-helpers
Function Implementation
discord-7d2d-status-helpers 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.








































