RoomMessage

io.github.pidoveproject.showdown.protocol.server.RoomMessage

A message bound to a room

Attributes

Source
RoomMessage.scala
Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Enum entries

final case class Battle(room: RoomId, firstUser: User, secondUser: User)

A battle started.

A battle started.

Value parameters

firstUser

the first battle participant

room

the id of the battle room

secondUser

the second battle participant

Attributes

Source
RoomMessage.scala
final case class Chat(user: User, message: ChatContent)

A user sent a message in the room.

A user sent a message in the room.

Value parameters

message

the content of he message

user

the user who sent the message

Attributes

Source
RoomMessage.scala
final case class DeInit()

De-initialization message. Sent when the current user leaves the lobby.

De-initialization message. Sent when the current user leaves the lobby.

Attributes

Source
RoomMessage.scala
final case class Html(content: HTML)

An HTML message sent by the server

An HTML message sent by the server

Value parameters

content

the content of the message

Attributes

Source
RoomMessage.scala
final case class Init(roomType: RoomType)

Initialization message. Sent first when entering a room.

Initialization message. Sent first when entering a room.

Value parameters

roomType

the type of the room. Either battle or chat.

Attributes

Source
RoomMessage.scala
final case class Join(user: User)

A user joined the room.

A user joined the room.

Value parameters

user

the user who joined the room

Attributes

Source
RoomMessage.scala
final case class Leave(user: User)

A user left the room.

A user left the room.

Value parameters

user

the who lef the room

Attributes

Source
RoomMessage.scala
final case class Message(content: ChatContent)

A chat message sent by the server

A chat message sent by the server

Value parameters

content

the raw content of the message

Attributes

Source
RoomMessage.scala
final case class Name(newName: User, oldName: User)

A user changed their name

A user changed their name

Value parameters

newName

the new name of the user

oldName

the old name of the user

Attributes

Source
RoomMessage.scala
final case class Notify(title: String, content: String, token: Option[HighlightToken])

A notification was sent in the room.

A notification was sent in the room.

Value parameters

content

the content of the notification

title

the title of the notification

token

the (optional) highlight token of this notification

Attributes

Source
RoomMessage.scala
final case class Timestamp(time: Timestamp)

An update on the current time of the room.

An update on the current time of the room.

Value parameters

time

the current timestamp of the room (UNIX format)

Attributes

Source
RoomMessage.scala
final case class TimestampChat(time: Timestamp, user: User, message: ChatContent)

A chat message with a timestamp attached.

A chat message with a timestamp attached.

Value parameters

message

the content of he message

time

the timestamp of the message

user

the user who sent the message

Attributes

Source
RoomMessage.scala
final case class Title(title: String)

An update on the title of the room.

An update on the title of the room.

Value parameters

title

the current title of the room

Attributes

Source
RoomMessage.scala
final case class UHtml(name: String, content: HTML)

A named HTML message sent by the server

A named HTML message sent by the server

Value parameters

name

the name of this message, used to update it later

Attributes

Source
RoomMessage.scala
final case class UHtmlChange(name: String, content: HTML)

An update on a previously sent UHtml message

An update on a previously sent UHtml message

Value parameters

content

the new content of the message

name

the name of the message to update

Attributes

Source
RoomMessage.scala
final case class Users(users: UserList)

The users in the room when joining.

The users in the room when joining.

Value parameters

users

the current list of users who joined the room

Attributes

Source
RoomMessage.scala