How integrations work
When something notable happens on the server — a player connects, a game turn completes, a chat message is sent — theUniverse class calls pushMessage with the event and its interest type. Every loaded integration that subscribed to that interest type receives the message and forwards it through its own delivery mechanism.
Integrations are loaded at startup from the integrations array in config.json. Each entry specifies:
class— the integration to use, matching a file inclass/integrations/interests— an array of event types the integration should receiveauthData— credentials or configuration specific to the integration (not required for all integrations)language— optional locale code for formatted messages (defaults to"en")
Interest types
Each integration subscribes to one or more of the following interest types. Use only the string values listed here in yourinterests array.
Built-in integrations
Four integrations ship with Voxel Telephone. Theclass field in your config must match the class name exactly.
ServerAnnouncement and ConsoleLog do not require an authData field.Configuring multiple integrations
You can add as many entries to theintegrations array as you need. Each runs independently, and an event is delivered to every integration that lists the matching interest type.
The example below sends game progression events to Discord, routes chat messages to Slack, and broadcasts announcements to all players in-game:
Integration pages
Discord webhook
Post game events to a Discord channel using an incoming webhook URL.
Slack
Forward server events to a Slack channel using a Slack bot token.