Skip to content

LobbyServerMessage beta ​

TypeAlias of @v12-engine/engine

ts
export type LobbyServerMessage = {
    type: 'lobby';
    mode: string;
    game: string;
    phase: 'lobby' | 'game' | 'ended';
    seats: ServerSeat[];
    settings: Record<string, string>;
    offered: NonNullable<ServerHooks['settings']>;
    seatOffered: NonNullable<ServerHooks['seatSettings']>;
} | {
    type: 'seated';
    player: PlayerId;
    token: string;
}
/** A line said in the lobby (`lobbyChat`): by whom, their seat where they have one */
 | {
    type: 'lobbyChat';
    player?: PlayerId;
    name: string;
    text: string;
} | {
    type: 'watching';
    player: PlayerId;
} | {
    type: 'full';
} | {
    type: 'refused';
    reason: string;
}
/** The game paused, or going on: by a player (`player`, for `seconds` at most) or by an admin (no player) */
 | {
    type: 'paused';
    paused: boolean;
    player?: PlayerId;
    seconds?: number;
} | {
    type: 'result';
    result: GameResult;
};

What the server tells everyone connected, as it changes