IJustDev / whatsapp-chess

9 stars 5 forks source link

WhatsApp Chess Bot

This WhatsApp bot will allow you to play chess directly in your chat.

How does this work?

It's made possible by some great guys hooking into WhatsApp web. Reverse Engineer Repo

I've used chess-base to validate a players move and chess-image-generator to render each move.

Usage

$ npm install
$ npm run start

Will show up an QR-Code on your terminal. You need to scan it like you would with WhatsApp web.

After that the bot is active and you can use

# WhatsApp Chess

#new - starts a new game
#move a2a4 - moves the piece on field a2 to field a4
#status - display the current board and stats
#help - display this help prompt.

Demo

But why?

WHO WOULDN'T LOVE TO PLAY CHESS ON HIS PHONE? But seriously, it was an expirement how well bots could be integrated with WhatsApp and what they are capable of.

Furtheremore the code is to be honest the worst piece I ever wrote. It will require refactoring asap.

Thank you

If you want to know more about those random projects, follow @IJustDev on GitHub. Feel free to share this project or create merge requests, really appreciate any kind of contribution.