doper1 / POK

A whatsapp bot for playing poker
Apache License 2.0
0 stars 0 forks source link

POK

POK is an open-source WhatsApp bot that brings poker games to group chats, automating card dealing, game rules, and tracking the game state for seamless play.

Features

Architecture

Visualization of the codebase

Tech Stack

Installation

Prerequisites

If using docker:

If not using docker:

Clone the Repository

git clone https://github.com/doper1/POK.git
cd POK

Install Dependencies (if not using docker)

npm install

Run the Bot

docker compose up --build
npm start

Usage

  1. Setup the Bot: Once the bot is running, a QR code will appear on the terminal. Scan the QR code with your whatsapp app this will enable the bot to communicate through you whatsapp account
  2. Start a Game: At least 2 players need to join the game using pok join. They then need to buy chips using pok buy or just pok join [chip amount] right away

IMPORTANT - Each players get $1000 (in-game) when they first join. The ONLY way to earn more is buy playing. If you lost all of your 1000 - you cannot play anymore. The initial $1000 are consists between whatsapp group and are not individual to each group.

Currently, blinds are 1/2 and there is no way to change it. I suggest to buy in between $50 to $150 for each game, until there will be a mechanism to increase blinds

Pre-Game Commands

In-Game Commands

Contributing

Contributions are welcome! Please fork the repository, create a new branch, and submit a pull request.

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature/your-feature.
  3. Commit your changes: git commit -m 'Add some feature'.
  4. Push to the branch: git push origin feature/your-feature.
  5. Open a pull request.

Please ensure your commits are clear and are by the Conventional commits standard. Also make sure to write tests using jest and put them in the closet __tests__ directory.

Because of the DB integration all the tests got invalid so I deleted them all. The can still be found in version 3.1.0 and prior. Their directories still exists

License

This project is licensed under the Apache License.

Contact

For issues, questions, or feedback, feel free to open an issue on GitHub