UpdateEvent
Message
type UpdateEvent = {
type: 'update'
allowOtherServers: boolean
reportUserOptions: ServerOptionsSection[]
title: string
status: RoomStatus
master: 'room' | (string & {})
lead: 'room' | (string & {})
options: ServerOptionsSection[]
optionValues: string
level?: LevelLocator
levelOptions: LevelOptionEntry[]
autoExit: AutoExit
isSuggestionsLocked: boolean
suggestions: Suggestion[]
scoreboardDescription: string
scoreboardSections: ScoreboardSection[]
results: ResultEntry[]
users: RoomUser[]
userStatuses: UserStatusEntry[]
}
Remarks
Upon receiving, client will:
- Raise a fatal error if
master
is notroom
but does not exist inusers
. - Raise a fatal error if
lead
is notroom
but does not exist inusers
. - Raise a fatal error if
options
is empty. - Raise a fatal error if
optionValues
is not a valid value foroptions
. - Raise a fatal error if
status
is not selecting butlevel
is empty. - Raise a fatal error if
levelOptions
contains duplications. - Raise a fatal error if
suggestions
contains duplications. - Raise a fatal error if
users
contains duplications. - Raise a fatal error if
users
does not contain client's user. - Update state.