io.github.pidoveproject.showdown.protocol.client.HighlightCommand.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scala-showdown-api_3 Show documentation
Show all versions of scala-showdown-api_3 Show documentation
A Scala wrapper of Pokemon Showdown's API
The newest version!
package io.github.pidoveproject.showdown.protocol.client
import io.github.pidoveproject.showdown.protocol.MessageEncoder
import scala.collection.immutable
/**
* A command bound to the highlighting feature.
*/
enum HighlightCommand:
/**
* Add words to the highlighting list.
*
* @param words the list of words to highlight
*/
case Add(words: immutable.List[String])
/**
* Add words to a room-specific highlighting list.
*
* @param words the list of words to highlight
*/
case RoomAdd(words: immutable.List[String])
case List
case RoomList
/**
* Remove words from the highlighting list.
*
* @param words the list of words to not highlight
*/
case Delete(words: immutable.List[String])
/**
* Remove words from a room-specific highlighting list.
*
* @param words the list of words to not highlight
*/
case RoomDelete(words: immutable.List[String])
/**
* Clear the global highlighting list.
*/
case Clear
/**
* Clear the highlighting list of the current room.
*/
case RoomClear
/**
* Clear both global and room highlighting list.
*/
case ClearAll
object HighlightCommand:
given MessageEncoder[HighlightCommand] =
MessageEncoder.string.zip(MessageEncoder.derived[HighlightCommand]).contramap(value => ("highlight", value))