Home

Awesome

The PvP chess bot for the Telegram

Travis (.org) GitHub search hit counter GitHub code size in bytes

Overview

A simple PvP chess game based on inline message and edit a reply markup of a chess board. The board built with callback buttons of inline-keyboard. Bot uses the node-chess package, which is driven by the algebraic notation of moves (PGN).

Features:

[Demo](https://t.me/chessy_bot) (WIP version)

Usage

To play chess simply type @chessy_bot[SPACE] to your telegram message input box.

Then choose a side you want to play with. You will see an inline message with a chess board and a "Join to game" at the bottom.

When someone join your game, this will be displayed in the status message. Also the "Join to game" button will become "Settings".

Now everything is ready to start the game. To move your pieces just select a piece you want to move and then select a destination from displayed available to move squares.

WARNING!!!

The board is rotating each turn by default! The active player always placed at the bottom!

Install and run own bot instance

First clone this repository and install dependencies. Run in the terminal:

git clone git@github.com:Piterden/chessbot.git
cd chessbot
npm i

Then you have to create and fill up a new .env file:

cp .env.example .env
editor .env

Next migrate the DB:

npm run knex migrate:latest

Then run the dev mode:

npm run dev

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Donate