five-on-it / apps/server/src/room-social / RoomSocialOptions
Interface: RoomSocialOptions
Defined in: apps/server/src/room-social.ts:56
What a room's social side is built with.
Properties
log?
optionallog?: (message) =>void
Defined in: apps/server/src/room-social.ts:66
Where to log.
Parameters
message
string
Returns
void
moderate?
optionalmoderate?: (text) =>Promise<boolean>
Defined in: apps/server/src/room-social.ts:58
Checks a player's line before anyone else reads it (a public room's moderation); without it the room is private.
Parameters
text
string
Returns
Promise<boolean>
now?
optionalnow?: () =>number
Defined in: apps/server/src/room-social.ts:64
The clock (ms): the rate limit and the vote's time.
Returns
number
Methods
kick()
kick(
id):void
Defined in: apps/server/src/room-social.ts:60
Puts a player voted out of the room.
Parameters
id
number
Returns
void
voted()?
optionalvoted(target,yes,room):void
Defined in: apps/server/src/room-social.ts:62
Hears a vote won, before the target is put out: the target, the players who voted yes, and every player in the room then.
Parameters
target
yes
readonly SocialPlayer[]
room
readonly SocialPlayer[]
Returns
void