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

by SVMOTNIK
for 7 Days to Die
This Takaro module acts as an all-in-one bridge and monitoring system that links game servers, with specific support for 7 Days to Die, directly to Discord.
Use this module to:
  • 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.
communityTakaro 0.0.0

Components Overview

1
config
1
commands
7
hooks
2
Cron Jobs
1
functions
0
permissions

Updated 2 Hooks

July 29, 2026
Added 1 hook: monitorDeathLog (log). Updated 1 hook implementation.

New Module: SVMPersistentStatusAndDiscordBridge

NEW
July 28, 2026
Updated to version latest. Added 1 command: serverstats. 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)

languageenum
Message language

Default language for system messages.

Default: en
Allowed values (2):
enpl
discordChannelId*string
Discord channel ID for server status

Numeric Discord channel ID where the persistent server status is displayed.

Default:
chatRelayDiscordChannelIdstring
Discord channel ID for chat relay

Numeric Discord channel ID used for two-way game chat relay.

Default:
bloodMoonDiscordChannelIdstring
Discord channel ID for Blood Moon and monitoring notices

Discord channel for joins, leaves, deaths, and Blood Moon notifications.

Default:
relayDiscordToGameboolean
Relay Discord to game

Relay Discord chat messages into in-game chat.

Default: true
relayGameToDiscordboolean
Relay game to Discord

Relay in-game chat messages to the Discord chat channel.

Default: true
playerChatEmojistring
Discord player chat emoji

Emoji displayed before a player name when relaying game chat to Discord.

Default: <a:soldierWALK:1530994865847013518>
monitorJoinsboolean
Monitor player joins

Send a notification when a player joins the server.

Default: true
monitorLeavesboolean
Monitor player leaves

Send a notification when a player leaves the server.

Default: true
monitorDeathsboolean
Monitor player deaths

Send a notification when a player dies.

Default: true
privateBloodMoonNoticeOnFirstJoinboolean
Private Blood Moon notice on first join

Privately notify the first joining player when Blood Moon is active or starts today.

Default: false
timeConsoleCommandstring
Game console command for reading time

Console command that returns the current in-game day and time.

Default: gettime
firstHordeDayinteger
First horde day

First Blood Moon horde day.

Default: 7
Constraints: min: 1
hordeIntervalDaysinteger
Horde interval in days

Number of days between Blood Moon hordes.

Default: 7
Constraints: min: 1
bloodMoonStartHourinteger
Blood Moon start hour

In-game hour when Blood Moon starts.

Default: 22
Constraints: min: 0, max: 23
bloodMoonEndHourinteger
Blood Moon end hour

In-game hour when Blood Moon ends.

Default: 4
Constraints: min: 0, max: 23
bloodMoonIconstring
Blood Moon status icon

Text or emoji appended to the status while Blood Moon is active.

Default: ⭒ 🩸
statusTemplatestring
Server status template

Status message template. Available placeholders: {onlinePlayers}, {day}, {time}, {bloodMoonIcon}, {playerList}, {serverName}.

Default: {onlinePlayers} online ⭒ Day {day} ⭒ {time}{bloodMoonIcon} Players: {playerList}
joinMessageTemplatestring
Player join template

Message sent to the monitoring channel when a player joins. Placeholder: {player}.

Default: {player} joined the game.
leaveMessageTemplatestring
Player leave template

Message sent to the monitoring channel when a player leaves. Placeholder: {player}.

Default: {player} left the game.
deathMessageTemplatestring
Player death template

Death message without a reason. Placeholder: {player}.

Default: {player} died.
deathWithReasonMessageTemplatestring
Player death with reason template

Death message with a reason. Placeholders: {player}, {reason}.

Default: {player} died: {reason}
bloodMoonTodayMessagestring
Public Blood Moon day message

Announcement sent on horde day. Placeholder: {day}.

Default: Day {day}. Blood Moon is expected today...
privateBloodMoonTodayMessagestring
Private Blood Moon day message

Private message sent to the first player on horde day. Placeholder: {day}.

Default: Day {day}. Blood Moon is expected today...
bloodMoonStartingMessagestring
Blood Moon start message

Notification sent when the horde starts.

Default: Blood Moon is rising...
bloodMoonEndingMessagestring
Blood Moon end message

Notification sent after the horde night ends.

Default: Blood Moon is fading...
serverStartingMessageTemplatestring
Server start template

Server startup message. Placeholder: {serverName}.

Default: Server starting...
serverOfflineMessageTemplatestring
Server offline template

Message sent when the server goes offline. Placeholder: {serverName}.

Default: Server offline.
emptyPlayerListTextstring
Empty player list text

Text shown when nobody is online.

Default: No players online
unknownPlayerTextstring
Unknown player text

Fallback player name.

Default: Player
serverSenderNamestring
Server message sender name

Label for system messages.

Default: 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.

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.

serverstats

/serverstatsTrigger Command

Description

Shows online player count, current day, time, and blood moon indicator.

Function Implementation

serverstats Function

JAVASCRIPT

Usage Example

Player types: /serverstats

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

4 hooks

discordChatRelay

discord-messageEvent Type
Description
Relays Discord chat channel messages into game chat.
Function Implementation

discordChatRelay Hook Function

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

gameChatRelay

chat-messageEvent Type
Description
Relays in-game chat messages to Discord chat channel.
Function Implementation

gameChatRelay Hook Function

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

monitorLeave

player-disconnectedEvent Type
Description
Sends player leave messages to the monitoring channel.
Function Implementation

monitorLeave Hook Function

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

monitorJoin

player-connectedEvent Type
Description
Sends player join messages to the monitoring channel.
Function Implementation

monitorJoin Hook Function

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

System Events

2 hooks

monitorServerStatus

server-status-changedEvent Type
Description
Sends server online and offline messages to the monitoring channel.
Function Implementation

monitorServerStatus Hook Function

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

monitorDeathLog

logEvent Type
Description
Fallback death monitor for 7D2D log lines when the connector does not emit player-death events.
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

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

Custom Events

1 hook

monitorDeath

player-deathEvent Type
Description
Sends player death messages to the monitoring channel.
Function Implementation

monitorDeath Hook Function

JAVASCRIPT
Event Details
Event Type:player-death
Trigger:Automatic
Category:Custom 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 (2)

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

bloodMoonMonitor

* * * * *Schedule

Description

Checks 7D2D phase transitions every minute and sends blood moon day/start/end notices.

Schedule Details

Cron Expression
* * * * *
Human-Readable Schedule

Every minute

Function Implementation

bloodMoonMonitor 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).

updateStatus

* * * * *Schedule

Description

Updates the persistent Discord server status message.

Schedule Details

Cron Expression
* * * * *
Human-Readable Schedule

Every minute

Function Implementation

updateStatus 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.

discord-7d2d-status-helpers

functionReusable Component

Function Implementation

discord-7d2d-status-helpers Function

JAVASCRIPT

Import Usage

Import: import { discord-7d2d-status-helpers } 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.