The bot for playing Decrypto board game, you must use it only to try how it works, then please buy the game itself ;)
working
-
fill .env
-
start project
docker-compose up
or
npm run dev
- setup bot
curl https://api.telegram.org/bot<TELEGRAM_TOKEN>/setWebhook?url=https://europe-central2-zinovik-project.cloudfunctions.net/decrypto-board-game-bot?token=<TOKEN>
testing
curl --location 'localhost:8080'
curl https://api.telegram.org/bot<TOKEN>/setWebhook?url=https://<NGROK ID>.ngrok.io/index
~/ngrok http 8080
gcloud iam service-accounts create github-actions
add roles (Service Account User
and Cloud Functions Admin
) to the service account you want to use to deploy the function
gcloud projects add-iam-policy-binding zinovik-project --member="serviceAccount:[email protected]" --role="roles/cloudfunctions.admin"
gcloud projects add-iam-policy-binding zinovik-project --member="serviceAccount:[email protected]" --role="roles/iam.serviceAccountUser"
gcloud iam service-accounts keys create key-file.json [email protected]
cat key-file.json | base64
gcloud projects add-iam-policy-binding zinovik-project --member="serviceAccount:[email protected]" --role="roles/secretmanager.secretAccessor"
printf "TELEGRAM_TOKEN" | gcloud secrets create decrypto-board-game-bot-telegram-token --locations=europe-central2 --replication-policy="user-managed" --data-file=-
printf "TOKEN" | gcloud secrets create decrypto-board-game-bot-app-token --locations=europe-central2 --replication-policy="user-managed" --data-file=-