From 8cc185834a63b73ac04cc630a34cc0b10f24e773 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 13 Feb 2021 18:07:12 -0500 Subject: [PATCH] Show FEN in chess --- commands/games-mp/chess.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commands/games-mp/chess.js b/commands/games-mp/chess.js index 7fd4d32d..00cff872 100644 --- a/commands/games-mp/chess.js +++ b/commands/games-mp/chess.js @@ -1,4 +1,5 @@ const Command = require('../../structures/Command'); +const { escapeMarkdown } = require('discord.js'); const jsChess = require('js-chess-engine'); const { createCanvas, loadImage } = require('canvas'); const moment = require('moment'); @@ -126,6 +127,7 @@ module.exports = class ChessCommand extends Command { _You are ${gameState.check ? '**in check!**' : 'not in check.'}_ **Time Remaining: ${displayTime}** (Max 10min per turn) + **FEN:** ${escapeMarkdown(game.exportFEN())} `, { files: [{ attachment: this.displayBoard(gameState, prevPieces), name: 'chess.png' }] }); prevPieces = Object.assign({}, game.exportJson().pieces); const moves = game.moves();