Interface SendChatOptions

Options regarding sending a chat message into the room as the server, see sendChat

Hierarchy

  • SendChatOptions

Properties

color: Color

The color of the player to appear as.

Example

ev.room.sendChat("i am the impostor", {
name: "<color=red>The Impostor</color>",
color: Color.Red
});
hatId: string

The hat that the player should be wearing in the chat message.

Example

ev.room.sendChat("I'm a cowboy baby", {
name: "Cowboy",
hatId: Hat.TenGallonHat
})
name: string

The name of the player to appear as.

Example

ev.room.sendChat("i am the impostor", {
name: "<color=red>The Impostor</color>",
color: Color.Red
});

The side of the chat box for the message to appear on for each player. Can only send on the left side if there are at least 2 players in the room.

Example

room.sendChat("Slide to the left", {
side: MessageSide.Left
});

room.sendChat("Slide to the right", {
side: MessageSide.Right
});
skinId: string

The skin that the player should be wearing in the chat message.

Example

ev.room.sendChat("looking for salvation in a secular age", {
name: "the 1975",
skinId: Skin.Prisoner
})
targets: undefined | PlayerData<Hostable<any>>[]

The player to send the message to, if omitted, sends to all players.

Example

// Alert the host of a hacker
.@EventListener("anticheat.potential")
onPotentialCheater(ev: AnticheatPotentialEvent) {
if (!ev.player.info)
return;

ev.room.sendChat("<color=red>Potential cheater detected: " + ev.player.info.name + "</color>", {
targets: [ ev.room.host ]
});
}
visorId: string

The visor that the player should be wearing in the chat message.

Example

ev.room.sendChat("wondering how I got this far", {
name: "scruffpuppie",
visorId: Hat.PolusIce
})

Generated using TypeDoc