3.39.0 • Published 1 year ago

cf-workers-telegram-bot v3.39.0

Weekly downloads
-
License
(MIT OR Apache-2....
Repository
-
Last release
1 year ago

cf-workers-telegram-bot

serverless telegram bot on cf workers

The original worker.js is the content of Nikhil John's https://github.com/nikhiljohn10/telegram-bot-worker which is licensed with MIT. My modifications are licensed under the Apache license.

Deploy to Cloudflare Workers

To use the deploy button:

  • Click the deploy button
  • Navigate to your new GitHub repository > Settings > Secrets and add the following secrets:

    - Name: CF_API_TOKEN (should be added automatically)
    - Name: CF_ACCOUNT_ID (should be added automatically)
    
    - Name: SECRET_TELEGRAM_API_TOKEN
    - Value: your-telegram-bot-token
  • Push to master to trigger a deploy

To fork this repo and use wrangler:

  • Click fork
  • wrangler secret put SECRET_TELEGRAM_API_TOKEN and set it to your telegram bot token
  • wrangler publish
  • Done!

Getting started with cf-workers-telegram-bot

Once you've deployed the bot you can get your Webhook command URL by doing any of the following.

  • sha256sum(YourTelegramSecretKey) is the path to your webhook commands and should be put at the end of your worker URL to access commands such as setting your webhook
  • Use sha256sum <<< "your secret key" to get the path
  • Open the Cloudflare Worker Logs under Workers > cf-workers-telegram-bot > Logs > Begin log stream and make a GET request (open it in your browser) to your Worker URL and look at the logs to see your Access URL
  • Run wrangler tail --format pretty from inside your git repository and make a GET request to your Worker URL

Example URL for setting the Webhook and dropping pending updates:

https://cf-workers-telegram-bot.codebam.workers.dev/a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447?command=set

3.39.0

1 year ago

3.36.0

1 year ago

3.37.0

1 year ago

3.38.0

1 year ago

3.31.0

1 year ago

3.33.0

1 year ago

3.34.0

1 year ago

3.35.0

1 year ago

3.29.0

1 year ago

3.27.0

1 year ago

3.26.0

1 year ago

3.25.0

1 year ago

3.24.0

1 year ago

3.23.0

1 year ago

3.22.0

1 year ago

3.21.0

1 year ago

3.20.0

1 year ago

3.19.0

1 year ago

3.18.0

1 year ago

3.17.0

1 year ago

3.16.0

1 year ago

3.14.0

1 year ago

3.13.0

1 year ago

3.12.0

1 year ago

3.10.0

1 year ago

3.9.0

1 year ago

3.8.0

1 year ago

3.7.0

1 year ago

3.6.0

1 year ago

3.5.0

1 year ago

3.4.0

1 year ago

3.3.0

1 year ago

3.2.0

1 year ago

3.1.0

1 year ago