Note
This code was written many years ago for fun and can be not very good optimised (or written).
However, it is still can serve as PoC
Inline "Rock-Paper-Scissors" game for Telegram bot using inline buttons. Play directly in any chat.
-
Install dependencies:
pip install pyTelegramBotAPI
-
Clone the repository:
git clone https://github.com/tizhproger/inline_rps.git cd inline_rps -
Set your bot token in
inline_rps.py:API_TOKEN = "YOUR_TELEGRAM_BOT_TOKEN"
-
Run the bot:
python inline_rps.py
- In any Telegram chat, type
@YourBotUsernamein message field, select the "Rock, paper, scissors" - First player makes a move, second responds
- Bot displays the result and winner