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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
Pick<TextChannelOptions, "canSend"> |
Returns
Section titled “Returns”Example
Section titled “Example”export const textChat = defineTextChat({ channels: { all: textChannel(), match: matchTextChannel() }, });