Skip to main content

Module challenges

Module challenges 

Source
Expand description

Challenges: create (optionally accepted at once with the opponent’s token), accept, decline, cancel, list, and lapse.

Structs§

Request
A parsed POST /api/challenge/{username} body.

Constants§

RULES

Functions§

accept
cancel
create
Create a challenge. With acceptByToken, the opponent’s token accepts it in the same transaction and the game starts at once.
create_accepted
A challenge accepted at once on the opponent’s behalf (the computer).
decline
expire
Lapse challenges past their time (sweeper).
keep_alive
Keep a challenge from lapsing while its challenger’s stream is open.
list
Pending challenges to and from a player: (in, out).
status
The current status of a challenge.
valid_limit
Lichess’s real-time clock limits: 0, ¼, ½, ¾, 1, 1½ minutes, then any whole number of minutes up to three hours.