Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

matchTextChannel

matchTextChannel(options?): TextChannel

A text channel that reaches the sender’s match: its members, the eliminated among them, and its spectators, as partyTextChannel reaches the sender’s party. A player who neither plays nor watches a match cannot write to it. Its canSend narrows who writes, such as spectators who read alone: matchTextChannel({ canSend: (world, sender) => findMatch(world, sender) !== null || "Spectators read only." }), since a spectator stays in the park.

Parameter Type
options Pick<TextChannelOptions, "canSend">

TextChannel

export const textChat = defineTextChat({
channels: { all: textChannel(), match: matchTextChannel() },
});