Chess Discord bot
A two-player chess game on one card that updates after every move.
No code needed. Try it in your browser before adding it to Discord.

What it does
A two-player chess game on one card that updates after every move. Challenge someone with /chess play @opponent: the card shows both players, the board as one large picture with coordinates on all sides, whose turn it is, a warning when a king is in check, the pieces each side has taken, the last move and the move list. To move, pick one of your pieces in the menu under the board (only pieces that can move are listed), then pick its square in the second menu, which marks captures and checks; Back returns to the pieces, and only the player to move can use them. Typing /chess move e2 e4 still works, and /chess resign or the Resign button gives up. A pawn reaching the last rank becomes the piece you pick (a queen by default), and capturing the king wins the game.
Commands
/chess playChallenge someone to a chess game/chess moveMake a chess move/chess resignResign from your current chess game
Add Chess to your server
Log in with Discord
Sign in with your Discord account and choose the server where you want it.
Try it here
Play with commands, buttons and replies in a simulated Discord server, right in your browser. Your real server stays untouched.
Add it to your server
Choose your server, check the settings and add your module. Want something different? Just ask MEE6 to change it.
The prompt behind it
Build chess between two members as a /chess command with subcommands, each game being one Components V2 card updated in place after every move. /chess play challenges someone. The card is a container: a heading with both players, the board as one full-width picture (a gallery, not a thumbnail) composed from a set of twelve piece sprites you make with the image model, then whose turn it is, a check warning, the pieces each side has taken, the last move and the recent move list, then a two-step move input: a select menu of the pieces of the side to move that have at least one move, and once one is picked the card is rewritten with a menu of that piece's squares, each marked with what it takes and whether it gives check, plus a Back button; a Resign button is always there. Only the player to move can use the menus; others get a private explanation. Keep /chess move from one square to another in algebraic notation like e2 to e4 as a typed alternative, with an optional promotion piece. Pieces move and capture as in chess without castling or en passant, a pawn reaching the last rank becomes the piece picked (a queen by default), capturing the king wins, and /chess resign gives up. A setting chooses between rewriting one card and posting a new card after every move.