io.github.pidoveproject.showdown.user.UserSettings.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.user
import io.github.pidoveproject.showdown.protocol.MessageDecoder
import zio.json.*
/**
* Represents various settings of a user.
*
* @param blockChallenges whether this user blocks challenges from others or not
* @param blockPMs whether this user blocks private messages from others or not
* @param ignoreTickets whether this user ignore tickets or not
* @param hideBattlesFromTrainerCard whether this user hides its trainer card from battles or not
* @param blockInvites whether this user blocks invites from others or not
* @param doNotDisturb whether this user receives notifications or not
* @param blockFriendRequests whether this user blocks friend requests from others or not
* @param allowFriendNotifications whether this user allows notifications from friends or not
* @param displayBattlesToFriends whether this user's friends can see their battle or not
* @param hideLogins ???
* @param hiddenNextBattle ???
* @param inviteOnlyNextBattle ???
* @param language the language of this user's UI
*/
case class UserSettings(
blockChallenges: Boolean,
blockPMs: Boolean,
ignoreTickets: Boolean,
hideBattlesFromTrainerCard: Boolean,
blockInvites: Boolean,
doNotDisturb: Boolean,
blockFriendRequests: Boolean,
allowFriendNotifications: Boolean,
displayBattlesToFriends: Boolean,
hideLogins: Boolean,
hiddenNextBattle: Boolean,
inviteOnlyNextBattle: Boolean,
language: Option[String]
) derives JsonDecoder, JsonEncoder
object UserSettings:
given MessageDecoder[UserSettings] = MessageDecoder.fromJson