Telegram bot that lets you play rock paper scissors against other people in the group
-
Create a bot using telegrams botfather this will generate an API key you can use.
-
You will need to create a
.env
file in the repo directory to store your telegram API key with the following
BOT_API=XXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-
Run
npm install
to download all of the modules, this will create a node_modules folder. -
Run
npm start
in terminal to start the bot. -
Add the bot to your group and set it as admin
To start a game against a friend reply to any of their messages with play game rock
and you will be presented with the following screen
Press one of the 3 buttons to choose rock, paper or scissors. Your oponent won't know what you selected it will just say picked for whoever picked something, You don't have to pick in order, picking at the same time should work.
After both players pick you will see who won the round and what each player choose.
You can also draw.
After someone wins the game ( by default first to 3 ) there will be a brief animation and the game will end.
Any of the players playing can also stop the game by clicking on the stop button.