Skip to content

skhaz/telegram-compliquer-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Deploy

export PROJECT_ID=bots-for-telegram
export TOKEN=your-telegram-bot-token
gcloud run deploy container \
    --source "$(pwd)/container" \
    --region us-central1 \
    --allow-unauthenticated \
    --platform managed \
    --project ${PROJECT_ID}
gcloud run deploy compliquer \
    --source "$(pwd)/bot" \
    --region us-central1 \
    --allow-unauthenticated \
    --platform managed \
    --set-env-vars TOKEN=${TOKEN} \
    --set-env-vars JSON_RPC=$(gcloud run services describe container --format 'value(status.url)' --project ${PROJECT_ID}) \
    --project ${PROJECT_ID}

Set Webhook (only need to be done once)

curl "https://api.telegram.org/bot${TOKEN}/setWebhook?url=$(gcloud run services describe compliquer --format 'value(status.url)' --project ${PROJECT_ID})"